I got a new slicehost snippet, in order to play around and learn nginx and more about deployment in general. I installed there a ruby application (which I will call app1) that uses the passenger. I made this default application for use on this server with the following server block in my nginx configuration:
server { listen 80; server_name <my server ip>; root <path to app1 public folder>; passenger_enabled on; }
It works great. However, I want to try several different applications on this snippet, and therefore thought that I would configure it like this:
Http: /// app1
Http: /// app2
etc .. I thought I could do this by adding a location block and moving the specific things of application 1 into it like this:
server { listen 80; server_name <my server ip>; location ^~ /app1 { root <path to app1 public folder>; passenger_enabled on; } }
However, by doing this (and, of course, by rebooting nginx), switching to a simple IP address gives the message "welcome to nginx" (which I expect). But, going to / app 1, an error message is displayed:
404 Not Found The requested URL /app1 was not found on this server.
This is different from the error message I get when I go to another path on this ip, for example / foo:
404 Not Found nginx/0.8.53
So, as nginx knows about this place, but I did not configure it correctly. Can someone set me up right? Should I configure different server blocks instead of using locations? I am sure it is simple, but cannot solve it.
Greetings, max
source share