답변 2개
채택된 답변
+20 포인트
3년 전
.php 이외의 확장자 파일에서 php code 를 인식하도록 하는 설정입니다.
Apache
Copy
AddType application/x-httpd-php .php .html .htm
Copy
AddHandler application/x-httpd-php .php .html .htm
Nginx
Copy
location ~ \.(php|html|htm)$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
php-fpm
Copy
security.limit_extensions = .php .html .htm
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
3년 전
Copy
제일상단에 추가해주시면 됩니다. 당연히 인덱스 파일은 php 파일이여야 하고 웹서버 루트 폴더에 있으면
적용되실겁니다
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인