centos5.4 執行nginx一段時間之後就會出現這個訊息
The page you are looking for is temporarily unavailable.
Please try again later.
整個網站都會這樣
service restart也還是一樣
《解決方案》
回復 1# awelkije
是不是你fastcgi_index 沒設置呢 ?
《解決方案》
一開始執行網站都正常
這是我的設定檔案
#######################################################################
#
# This is the main Nginx configuration file.
#
# More information about the configuration options is available on
# * the English wiki - http://wiki.codemongers.com/Main
# * the Russian documentation - http://sysoev.ru/nginx/
#
#######################################################################
#----------------------------------------------------------------------
# Main Module - directives that cover basic functionality
#
# http://wiki.codemongers.com/NginxMainModule
#
#----------------------------------------------------------------------
user nginx;
worker_processes 8;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#----------------------------------------------------------------------
# Events Module
#
# http://wiki.codemongers.com/NginxEventsModule
#
#----------------------------------------------------------------------
events {
worker_connections 1024;
}
#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.codemongers.com/NginxHttpCoreModule
#
#----------------------------------------------------------------------
http {
include /etc/nginx/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 /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen 80;
server_name 192.168.0.128;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#root /usr/share/nginx/html;
root /var/www/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# 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 /usr/share/nginx/html;
root /var/www/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /var/www/html$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;
}
}
}
《解決方案》
本帖最後由 awelkije 於 2010-06-19 11:05 編輯
這是我的log檔案
2010/06/17 15:55:30 8863#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.157, server: 192.168.0.128, request: "GET /pma/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.0.128"
2010/06/17 15:55:30 8863#0: *3 open() "/var/www/html/pma/nginx-logo.png" failed (2: No such file or directory), client: 192.168.0.157, server: 192.168.0.128, request: "GET /pma/nginx-logo.png HTTP/1.1", host: "192.168.0.128", referrer: "http://192.168.0.128/pma/"
2010/06/17 15:55:30 8863#0: *4 open() "/var/www/html/pma/poweredby.png" failed (2: No such file or directory), client: 192.168.0.157, server: 192.168.0.128, request: "GET /pma/poweredby.png HTTP/1.1", host: "192.168.0.128", referrer:
《解決方案》
try to increase worker_rlimit_nofile