Welcome! Log In Create A New Profile

Advanced

nginx - nginx - fpm

Posted by hg_04 
nginx - nginx - fpm
November 08, 2011 04:27AM
Проблема в следующим в пхп передается сервер нейм "_", как это исправить?
есть конфиг
<code>
location / {
proxy_pass http://backend;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
</code>
на ноде
<code>
server {
listen 80;
server_name _;

index index.php index.php5 index.html;
root /var/www;

location / {
try_files $uri $uri/ @php;
}


error_page 404 /404.html;

location = /404.html {
root /usr/share/nginx/html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

location ~ \.php$ {
try_files $uri $uri/ @php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include fastcgi_params;
}
location @php {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param SCRIPT_FILENAME /var/www/index.php;
fastcgi_param QUERY_STRING url=$uri&$args;
}
}
</code>
Re: nginx - nginx - fpm
November 08, 2011 04:29AM
nginx старше 1.0

хотябы подскажите в какую сторону смотреть?
Re: nginx - nginx - fpm
November 08, 2011 10:26AM
вопрос решен
http://forum.nginx.org/read.php?21,218010,218015#msg-218015
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready