Welcome! Log In Create A New Profile

Advanced

nginx - nginx - fpm

November 08, 2011 10:07AM
извеняюсь за крос постинг, но я в отчаянии, убил день но не вижу решения.

nginx/1.1.6 PHP 5.3.8 (fpm-fcgi) (built: Oct 21 2011 12:22:04)
Проблема в следующим в пхп передается сервер нейм "_", как это исправить?
в конфиге fastcgi_params прописано
fastcgi_param SERVER_NAME $server_name;

есть конфиг
<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>
Subject Author Posted

nginx - nginx - fpm

hg_04 November 08, 2011 10:07AM

Re: nginx - nginx - fpm

Igor Sysoev November 08, 2011 10:14AM

Re: nginx - nginx - fpm

hg_04 November 08, 2011 10:14AM

Re: nginx - nginx - fpm

hg_04 November 08, 2011 10:15AM

Re: nginx - nginx - fpm

hg_04 November 08, 2011 10:23AM

Re: nginx - nginx - fpm

Igor Sysoev November 08, 2011 10:18AM

Re: nginx - nginx - fpm

Igor Sysoev November 08, 2011 10:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 146
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready