我在Ubuntu 12.04 64位上的Amazon EC2上运行带有PHP5-FPM的Nginx。 每当我到达我的网站时,我都会收到错误的网关错误。 我知道这是一个configuration问题,但我不知道什么是不良configuration。
我的错误日志:
2012/11/17 05:29:19 [error] 9519#0:* 4 open()“/var/www/growyourbutt.com/robots.txt”failed(2:No such file or directory),client:131.253 .41.146,server:growyourbut $ 2012/11/17 05:29:19 [error] 9519#0:* 5 open()“/var/www/growyourbutt.com/wp-content/themes/wp-bold107/images /facebook.png“失败(2:没有这样的文件或目录),clien $ 2012/11/17 05:30:36 [error] 9519#0:* 6”/var/www/growyourbutt.com/tag/brazilian (2:没有这样的文件或目录),客户端:$ 2012/11/17 05:31:56 [error] 9519#0:* 7 connect( )连接上游失败(111:连接被拒绝),客户端:67.85.186.145,服务器:growyourbutt.com,请求$ 2012/11/17 05:31:56 [error] 9519#0:* 10 connect()failed (111:连接被拒绝),同时连接到上游,客户端:188.138.0.168,服务器:growyourbutt.com,请求$ 2012/11/17 05:31:57 [error] 9519#0:* 12 connect()failed(111 :连接被拒绝)连接到上游时,客户端:188.138.0.168,服务器:growyourbut t.com,reque $ 2012/11/17 05:32:00 [错误] 9519#0:* 7连接()失败(111:连接拒绝),当连接到上游,客户端:67.85.186.145,服务器:growyourbutt。 com,reques $ 2012/11/17 05:33:37 [error] 9519#0:* 15连接失败(111:连接被拒绝),当连接上游时,客户端:67.85.186.145,服务器:growyourbutt.com,请求$ 2012/11/17 05:33:44 [错误] 9519#0:* 18连接()失败(111:连接拒绝),当连接到上游时,客户端:67.85.186.145,服务器:growyourbutt.com,reque $ 2012/11/17 05:33:44 [error] 9519#0:* 18 open()“/var/www/growyourbutt.com/favicon.ico”failed(2:No such file or directory),client:67.85 .186.145,server:growyourbu $ 2012/11/17 05:35:29 [error] 9519#0:* 20连接()失败(111:连接拒绝)连接上游时,客户端:220.181.108.160,服务器:growyourbutt .com,req $ 2012/11/17 05:35:45 [error] 9519#0:* 22连接()失败(111:连接被拒绝)连接上游时,客户端:123.125.71.111,serv 呃:growyourbutt.com,要求$
我的nginx.conf:
伺服器 – 数据; worker_processes 4; pid /run/nginx.pid;
事件{worker_connections 768; #multi_accept on; }
http {
## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65;
## # 基本设置 ##
sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; server_tokens off; server_names_hash_bucket_size 64; server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; port_in_redirect off;
server_tokensclosures;
server_names_hash_bucket_size 64; server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; port_in_redirect off; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ##
gzip on; gzip_disable“msie6”;
# gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/x-javascr$ ## # nginx-naxsi config ## # Uncomment it if you installed nginx-naxsi ## #include /etc/nginx/naxsi_core.rules; ##
包括/etc/nginx/conf.d/ .conf; 包括/ etc / nginx / sites-enabled / ; }
如果有人能帮我解决这个问题,我会非常感激。
php-fpm没有运行。 重新启动服务。