Я сделал разные виртхосты, и все заработало.
Нода
server {
charset utf8;
source_charset utf8;
server_name site.ru www.site.ru;
listen 0.0.0.0:80;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:8181/;
proxy_redirect off;
}
}
php5-fpm
server {
root /home/user/path/www;
index index.html index.php;
error_log /home/user/path/error.log;
charset utf8;
source_charset utf8;
server_name site.ru www.site.ru;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html /index.php;
}
#error_page 404 /404.html;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/user/path/www$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}