当frp遇上php
@ 安惪坔 · Monday, Aug 24, 2020 · 1 分钟阅读 · 更新于 Aug 24, 2020

frp 内网穿透

配置frp穿透,当内网环境为php时,且访问形式如https://www.php.com/index.php时,需在nginx中添加一条配置

server {
listen       80;
server_name  www.php.com;

root   /www/html;
index  index.html index.htm index.php;

# 这里重要
location / {
try_files $uri $uri/ /index.php?$query_string;
}

location ~ \.php$ {
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
include        fastcgi_params;
}

}

感谢

如果觉得我恰好对你有帮助,可以请我吃辣条!

wechat

It is better to attach some information or leave a message so that I can record the donation 📝, thank you very much 🙏.

关于我

一只肥宅,丑女,又宅又丑…

毕业院校: 白马书院

家庭住址: 大荒山无稽崖斜月三星洞