I have 2 application installed on my server using Nginx:
- Rails application
- wordpress blog
I want that the rails app will be accessible through: staging.mydomain.com and that the wordpress blog will be accessible through: blog.mydomain.com
the site works fine but when i try to access the blog i get "welcome to nginx" screen.
here is my nginx config:
server {
listen 80;
server_name staging.mydomain.com;
rails_env staging;
access_log /srv/www/staging/www/logs/access.log;
error_log /srv/www/staging/www/logs/error.log;
location / {
root /srv/www/staging/www/current/trunk/web/public;
passenger_enabled on;
}
}
server {
listen 80;
server_name blog.mydomain.com;
try_files $uri $uri/ /index.php;
access_log /srv/www/blog.mydomain.com/logs/access.log;
error_log /srv/www/blog.mydomain.com/logs/error.log;
location ~ \.php$ {
root /srv/www/blog.mydomain.com;
include fastcgi_params;
fastcgi_pass localhost:53217;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
any thoughts?