修改dockerfile

This commit is contained in:
0000792 2022-09-09 11:06:54 +08:00
parent 996bd13179
commit 56bc0ff1c4
1 changed files with 10 additions and 10 deletions

View File

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