修改dockerfile
This commit is contained in:
parent
996bd13179
commit
56bc0ff1c4
20
Dockerfile
20
Dockerfile
|
@ -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; \
|
||||||
|
|
Loading…
Reference in New Issue