Setting up Wordpress and Rails in Nginx
I haven't fixed the snippet from the question but I managed to solve the problem with nginx configuration without using a symbolic link by using two server
blocks.
server { location / { proxy_pass http://localhost:82/; } location /blog { root /var/proj/blog/current; fastcgi_intercept_errors on; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; }}# Rails server server { listen 82; root /var/proj/site/current/public; server_name site.com; passenger_enabled on; rails_env staging; client_max_body_size 20m; # other configuration}