리눅스

nginx 사용시 보안 이슈

초이짬 2015. 3. 10. 14:27
728x90

nginx 사용시 php 스쿨에서 본건데

원문은 : http://phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=77007&page=#c_77013

이걸 참고 하면 된다.

요지는 url 파라미터로 넘어오는 악성코드가 변조를 이용하여 실행이 가능한 근원적 문제가 있으니

설정값을 그대로 사용하지 말고 변경해서 사용하라는 것이다.

아래와 같이 try_files 항목을 추가

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

728x90

'리눅스' 카테고리의 다른 글

대용량 텍스트 파일 내용 변경하기  (0) 2015.03.12
nginx + php-fpm web was 영역 분리   (0) 2015.03.10
centos 6.x nginx yum 설치  (0) 2015.03.09
centos6.x 기본마운트  (0) 2015.03.05
rsync 이용법  (0) 2015.02.24