ruby on rails - setting up nginx.conf file -
i have vps passenger , nginx installed , trying app deployed, however, i'm getting 404 error. in vpn app located in:
~/app1
so in nginx.conf file have following:
server { listen 80; server_name localhost; location / { root /app1/public; } passenger_enabled on; }
however, tried setting root ~/app1/public, still got 404, i'm not quite sure how set up.
also, don't quite understand , pointing public work, don't have default index.html file, rather in routes.rb define root :to => "controller#index". how passenger find index page inside /views when pointing public directory?
thanks
try this
server { listen 80; # server_name mysite.com; root /app1/public; passenger_enabled on; }
and restart nginx:
$ sudo service nginx restart
Comments
Post a Comment