宝塔部署前后端时,配置域名与ssl证书

张开发
2026/4/4 17:45:27 15 分钟阅读
宝塔部署前后端时,配置域名与ssl证书
创建文件夹1.后端部署部署之后点击设置这步骤最关键# HTTP反向代理相关配置开始 location ~ /purge(/.*){proxy_cache_purge cache_one$Host$request_uri$is_args$args;}location /{proxy_pass http://127.0.0.1:8773;proxy_set_header Host$Host:$server_port;proxy_set_header X-Real-IP$remote_addr;proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_header REMOTE-HOST$remote_addr;add_header X-Cache$upstream_cache_status;proxy_set_header X-Host$host:$server_port;proxy_set_header X-Scheme$scheme;proxy_connect_timeout 30s;proxy_read_timeout 86400s;proxy_send_timeout 30s;proxy_http_version1.1;proxy_set_header Upgrade$http_upgrade;proxy_set_header Connectionupgrade;}# HTTP反向代理相关配置结束 2.前端location /{try_files$uri$uri/ /index.html;}

更多文章