更新端口
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# 宝塔面板Apache配置 - 前后端分离部署
|
||||
# 将API请求代理到Node.js后端服务(3001端口)
|
||||
# 将API请求代理到Node.js后端服务(4001端口)
|
||||
# 其他请求服务前端静态文件
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# 代理API请求到后端Node.js服务
|
||||
RewriteCond %{REQUEST_URI} ^/api/.*
|
||||
RewriteRule ^api/(.*)$ http://127.0.0.1:3001/api/$1 [P,L]
|
||||
RewriteRule ^api/(.*)$ http://127.0.0.1:4001/api/$1 [P,L]
|
||||
|
||||
# 代理uploads静态资源到后端
|
||||
RewriteCond %{REQUEST_URI} ^/uploads/.*
|
||||
RewriteRule ^uploads/(.*)$ http://127.0.0.1:3001/uploads/$1 [P,L]
|
||||
RewriteRule ^uploads/(.*)$ http://127.0.0.1:4001/uploads/$1 [P,L]
|
||||
|
||||
# 前端路由处理 - 所有非API和非静态资源请求都指向index.html
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
|
||||
Reference in New Issue
Block a user