diff --git a/docker-compose.yml b/docker-compose.yml index 1f8774c..a5d9b9f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: target: production container_name: huaxin-base-frontend ports: - - '80:80' + - '3001:3001' env_file: - .env - .env.production diff --git a/nginx.conf b/nginx.conf index 1dcc699..d473b74 100644 --- a/nginx.conf +++ b/nginx.conf @@ -33,7 +33,7 @@ http { #gzip on; server { - listen 80; + listen 3001; absolute_redirect off; #取消绝对路径的重定向 sendfile on; default_type application/octet-stream; @@ -61,7 +61,7 @@ http { # 后端服务 location ^~ /api/ { - proxy_pass http://huaxin-admin-server:7001/api/; # 转发规则 + proxy_pass http://huaxin-admin-server:8001/api/; # 转发规则 proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -69,7 +69,7 @@ http { # websocket服务 location ^~ /ws-api/ { - proxy_pass http://huaxin-admin-server:7002/ws-api/; + proxy_pass http://huaxin-admin-server:8002/ws-api/; proxy_read_timeout 300s; proxy_send_timeout 300s; @@ -81,7 +81,7 @@ http { } # 文件访问 location ^~ /upload/ { - proxy_pass http://huaxin-admin-server:7001/upload/; + proxy_pass http://huaxin-admin-server:8001/upload/; proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;