파일 : ~~~~/html/upload/.htaccess
1.
RemoveHandler .php .phtml .php3 .php4 .php5 .html .htm
RemoveType .php .phtml .php3 .php4 .php5 .html .htm
php_flag engine off
2.# apache 2.4
<FilesMatch "\.(php|phtml|php3|php4|php5|html|htm|log|txt)$">
Require all denied
</FilesMatch>
# apache 2.2
#<FilesMatch "\.(php|phtml|php3|php4|php5|html|htm|log|txt)$">
# Order allow,deny
# Deny from all
#</FilesMatch>
3.# apache 2.4
Require all denied
# apache 2.2
# Order allow,deny
# Deny from all
해당 폴더에서 php 동작을 중지 시킬때.
php파일 업로드 해킹에 대비.
1번 방법은 php-fpm 일 때 php_flag engine off 에서 에러날 수 있다.
2번 방법은 경로에서 파일 확장자를 체크해서 접근을 막는 방법
3번은 폴더 기준으로 모든 웹 접근을 막는다.