I am wants using Nginx as reverse proxy for my express.js app.
here is my nginx config :
server {
listen 80;
server_name my server ip address;
location / {
proxy_pass http://myip:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
and its my app.js :
var express = require('express');
var mongoose = require('mongoose');
var app = express();
app.set('view engine' , 'ejs');
app.use(express.static('public'));
app.get('/song', function(req, res, next) {
// my route
}
without nginx my app works very well but when i using nginx as reverse
proxy and go to my songroute node give me this error : Failed to lookup
view "default" in views directory
i want know where i am wrong. thanks.
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/b0cae452-d4f6-4c77-b16a-eeba9f26a0fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.