서버관리2014. 2. 20. 17:21
300x250


유닉스 리눅스 계열에서 많이 사용하는 웹서버로 아파치가 있는데, 

요즘은 nginx 를 쓰는 곳이 많아지고 있다. 


그래서 아래와 같은 오류 메시지가 많이 보인다. ^^





해결방법

1) 버퍼와 타임아웃 시간을 늘려라.

2) www.conf 에 listen 옵션을 넣어라.

3) APC 캐시를 사용한다면, 중지시켜라.



Other quick solutions:

1) Increase buffer and timeouts inside http block:

http {
...
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
...
}

2) Ensure your php-fpm service is listening according to what you’ve configured in nginx, it can be either this two options:

Edit www.conf file (in CentOS it is located at /etc/php-fpm.d/www.conf and try with one of this two options:

listen = /var/run/php5-fpm.sock

or

listen = 127.0.0.1:9000

After that, just restart the php-fpm service.

3) Disable APC Cache if used, instead try Xcache, apc can cause this kind of issues under particular enviroments causing segmentation faults.



* 출처

http://www.nginxtips.com/502-bad-gateway-using-nginx/



300x250
Posted by 마스타