php解析html
1154 ワード
多くの場合、.htmlもphp解析を使用する必要があります.nginxプロファイルの変更
このときこれらの接尾辞にアクセスすると403エラーが報告されます.php-fpmが接尾辞の解析を制限しているためです.
php-fpm.confプロファイルの変更
php-fpmサービスを再起動すればよい
location ~ \.(php|
do
|aspx)?$ {
#
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
このときこれらの接尾辞にアクセスすると403エラーが報告されます.php-fpmが接尾辞の解析を制限しているためです.
2016
/08/04
11:03:35 [error] 6225
#0: *65 FastCGI sent in stderr: "Access to the script '/var/www/html/index.aspx' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 127.0.0.1, server: www.abc.com, request: "HEAD /index.aspx HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"
php-fpm.confプロファイルの変更
security.limit_extensions = .php .aspx .
do
php-fpmサービスを再起動すればよい