[ 本帖最后由 muximx 于 2023-12-14 16:55 编辑 ]\n\n[ 本帖最后由 muximx 于 2023-12-14 16:54 编辑 ]\n\n为了能快速了解并处理您的问题,请提供以下基础信息: 面板、插件版本:8.0.4
系统版本:centOS7.9
问题描述:宝塔部署python项目怎么使用自己写的nginx配置生效,我往配置文件里 “#REWRITE-START 伪静态相关配置” 的那个链接文件里面写,总是说我的配置测试失败,无法保存,然后我改自己的nginx配置文件来引用也是说测试失败不能保存,该怎么操作
相关截图(日志、错误):自己的配置
server {
listen 8889;
charset utf-8;
gzip_static on;
location / {
root /www/wwwroot/ABCXXX/frontend/dist;
index index.html index.html;
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://localhost:8080/api/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /media/ {
proxy_pass http://localhost:8080/media/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
|
|