windows下nginx怎么解析html中的php代碼
1 回答

至尊寶的傳說
TA貢獻1789條經(jīng)驗 獲得超10個贊
方式一:打開你的網(wǎng)站的nginx配置文件,然后找到:location ~ \.php$ {,再把其中的\.php修改為:\.php|\.html,保存后重啟nginx即可。方式二:同上,打開配置文件找到:location ~ \.php$ {,然后把location整段復制,在下面粘帖上,再把\.php修改為\.html,保存后重啟nginx即可生效。上述兩種方式的配置示例代碼如下:location ~ \.php|\.html$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /webs$fastcgi_script_name; include fastcgi_params; }示例代碼二:location ~ \.html$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /webs$fastcgi_script_name; include fastcgi_params; }
- 1 回答
- 0 關(guān)注
- 1243 瀏覽
添加回答
舉報
0/150
提交
取消