nginx+php-fpm

L3
На сайте с 04.01.2010
Offline
45
1665

Подскажите что может быть. Настроил связку nginx+php-fpm все работало нормально, утром встал открываю сайт - 404, но админка сайта открывается, правда во фрейме где должна index страница админки открыться, опять 404.

файл php info открывается

nginx error_log

2012/03/14 17:03:26 [error] 21976#0: *50 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 217.69.133.28, server: _, request: "GET /cat-sarah-michelle-gellar-gallery-5-3901.htm HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "www.mysite.com"

2012/03/14 17:03:26 [error] 21976#0: *50 open() "/var/www/likbez-mp/data/www/mysite.com/50x.html" failed (2: No such file or directory), client: 217.69.133.28, server: _, request: "GET /cat-sarah-michelle-gellar-gallery-5-3901.htm HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "www.mysite.com"

конфиг nginx

user  nobody;

worker_processes 2;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name _;
rewrite ^/cat-(.*)-([0-9]+).htm$ /categories.php?cat_id=$2&$args;
rewrite ^/cat.htm$ /categories.php?$args;
rewrite ^/img-(.*)-([0-9]+).htm$ /details.php?image_id=$2&$args;
rewrite ^/img([0-9]+).search.htm$ /details.php?image_id=$1&$args;
rewrite ^/search.htm$ /search.php?$args;
rewrite ^/top100.htm$ /top100.php?%;
rewrite ^/search.([0-9]+).htm$ /search.php?page=$1&$args;
rewrite ^/articles-([0-9]+).htm$ /articles.php?id=$1&$args;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root /var/www/likbez-mp/data/www/mysite.com;
index index.php index.html index.htm;
}

error_page 404 /404.html;
location = /404.html {
root /var/www/likbez-mp/data/www/mysite.com;
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/likbez-mp/data/www/mysite.com;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /var/www/likbez-mp/data/www/mysite.com;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$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;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443;
# server_name localhost;

# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_timeout 5m;

# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}
M
На сайте с 01.12.2009
Offline
235
#1

$document_root = измените на /var/www/likbez-mp/data/www/mysite.com

root /var/www/likbez-mp/data/www/mysite.com везде уберите слешь

после изменения перезапустите nginx php-fpm

Администратор Linux,Freebsd. построения крупных проектов.
L3
На сайте с 04.01.2010
Offline
45
#2

Да тоже самое, слеш это уже я поставил, до этого без слеша было и все равно не пашет

Вот так админка, а сайт 404

M
На сайте с 01.12.2009
Offline
235
#3

надо смотреть

L3
На сайте с 04.01.2010
Offline
45
#4

В каком хоть направлении копать?

M
На сайте с 01.12.2009
Offline
235
#5

Я имел в виду, админу смотреть не вам )

Andreyka
На сайте с 19.02.2005
Offline
822
#6

Копать в направлении лога с ошибками

Не стоит плодить сущности без необходимости

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий