通常、次のようにNginx Webサーバーを設定しようとします。このガイドしかし、使用ペルーシオの構成。サイトにアクセスしようとすると、502 Bad Gatewayページが表示されます。
バグ検索をしてみたところ、何人かの人々がこのバグを報告しているのを見ました。fastcgi バッファサイズの設定すでに問題は解決しました。しかし、これは私にとってはうまくいきません。私のエラーログのメッセージは指定されたものとは異なりますが、次のようになります。
2013/06/11 10:21:24 [info] 32684#0: Using 32768KiB of shared memory for push module in /etc/nginx/nginx.conf:181
2013/06/11 10:21:24 [alert] 32692#0: epoll_ctl(1, 0) failed (1: Operation not permitted)
2013/06/11 10:21:24 [alert] 32692#0: failed to register channel handler while initializing push module worker (1: Operation not permitted)
2013/06/11 10:21:24 [alert] 32691#0: epoll_ctl(1, 0) failed (1: Operation not permitted)
2013/06/11 10:21:24 [alert] 32691#0: failed to register channel handler while initializing push module worker (1: Operation not permitted)
2013/06/11 10:21:25 [alert] 32686#0: cache manager process 32691 exited with fatal code 2 and cannot be respawned
nginx
このエラーを検索してみると、そのエラーと通信がないようですphp5-fpm
。実行中であることを確認しましたphp5-fpm
。
$ ps auxw | grep php
root 853 0.0 0.8 290416 4504 ? Ss 10:21 0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data 854 0.0 0.6 290416 3488 ? S 10:21 0:00 php-fpm: pool www
www-data 855 0.0 0.6 290416 3488 ? S 10:21 0:00 php-fpm: pool www
kyle 973 0.0 0.2 3824 1072 pts/0 S+ 10:42 0:00 grep php
そして次を聞いてください:
$ netstat --unix -l
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 43115 /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] SEQPACKET LISTENING 2674 /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 4772 /var/run/fail2ban/fail2ban.sock
unix 2 [ ACC ] STREAM LISTENING 43450 /var/run/php5-fpm.sock
unix 2 [ ACC ] STREAM LISTENING 4792 @/tmp/fam-root-
鉱山には、Unixソケットを介して接続をnginx.conf
試みる必要があるものが含まれています。upstream_phpcgi_unix.conf
php5-fpm
## Add as many servers as needed. Cf. http://wiki.nginx.org/HttpUpstreamModule.
upstream phpcgi {
## If your version of Nginx doesn't have the fair load balancer:
## https://github.com/gnosek/nginx-upstream-fair comment out the
## following line.
fair;
server unix:/var/run/php-fpm.sock;
server unix:/var/run/php-fpm-zwei.sock;
## Create a backend connection cache. Note that this requires
## Nginx version greater or equal to 1.1.4.
## Cf. http://nginx.org/en/CHANGES. Comment out the following
## line if that's not the case.
keepalive 5;
}
## Add a third pool as a fallback.
upstream phpcgi_backup {
server unix:/var/run/php-fpm-bkp.sock;
## Create a backend connection cache. Note that this requires
## Nginx version greater or equal to 1.1.4.
## Cf. http://nginx.org/en/CHANGES. Comment out the
## following line if that's not the case.
keepalive 1;
}
また何を見なければなりませんか?
ベストアンサー1
.aptitude purge
私nginx
も使用しましたペルーシオのPHP-FPM構成ファイル。