Para fazer com que o nginx passenger trabalhe com rails, basta adicionar outro servidor à sua configuração:
passenger_root /usr/lib64/ruby/gems/1.8/gems/passenger-2.2.5;
passenger_ruby /usr/bin/ruby;
server {
listen 80;
server_name SUBDOMAIN.DOMAIN.NO;
#access_log logs/host.access.log main;
passenger_enabled on;
rails_spawn_method smart-lv2;
rails_env production;
root /PATH/TO/YOUR/PROJECTS/PUBLIC;
location ~* \.(ico|jpg|jpeg|gif|png|css|js)$ {
root /PATH/TO/YOUR/PROJECTS/PUBLIC;
expires 30d;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.html\.erb$ {
deny all;
}
location ~ /\.ht {
deny all;
}
}
UPD: sobre seu problema de php, tente seguir o conjunto de parâmetros:
fastcgi_param DOCUMENT_ROOT /var/www/vhosts/domain.com/httpdocs;
fastcgi_param SCRIPT_FILENAME /var/www/vhosts/domain.com/httpdocs$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED /var/www/vhosts/domain.com/httpdocs$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;