标签:服务配置 index com csdn pathinfo 反向 listen htm param
server {
server_name adminapi-local.activity.com;
root D:\WWW\project\activity-api\public;
index index.php index.html;
access_log /data/log/nginx/lottery-$host.log;
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /admin.php?pathinfo=$1 last;
break;
}
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
fastcgi_param LOTTERY_ENV dev;
}
}
location / {
}
location ~ .php(.*)$ {
}
https://blog.csdn.net/zjuwangleicn/article/details/79300347
if( !-e $request_filename )
{
rewrite ^/(.*)$ index.php last;
}
https://www.linuxidc.com/Linux/2014-01/95493.htm
服务配置指令
listen 80 监听端口
server_name www.test.com 主机host
root /data/html 根目录
index index.php index.html 首页
location / {} 根目录路由
标签:服务配置 index com csdn pathinfo 反向 listen htm param
原文地址:https://www.cnblogs.com/zqsb/p/10968611.html