nginx 反向代理 uniapp 合并 php 开发,相关配置文件
spooking 归属分类: 开发 评论数: 0 个
#thinkphp 应用目录
location ~ ^/(api)/ {
    if (!-e $request_filename){
        rewrite ^(.*)$ /index.php/$1 last;
    }
}
#静态文件
location ~ ^/assets/ {
    break;
}
#反向 HBuilder X 测试环境
location /  { 
        proxy_pass http://127.0.0.1:5173;  
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-real-ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto   $scheme;

}