diff --git a/Dockerfile b/Dockerfile index 2cade74d..1c10e93e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,16 @@ FROM nginx MAINTAINER lfzxs@qq.com VOLUME /tmp ENV LANG en_US.UTF-8 -RUN echo "server { \ - listen 80; \ - location ^~ /smart-power { \ - #后端地址 - proxy_pass http://192.168.10.241:30646/; \ - proxy_set_header Host smart-power; \ - proxy_set_header X-Real-IP \$remote_addr; \ - proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \ - } \ - #解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \ +RUN echo "server { + location /prod-api/{ + proxy_read_timeout 600s; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-Ip $remote_addr; + proxy_pass http://192.168.10.241:30646/; + } location / { \ root /var/www/html/; \ index index.html index.htm; \