Merge remote-tracking branch 'origin/master' into dd
This commit is contained in:
@@ -12,5 +12,5 @@ docker rmi smartopsweb:latest
|
|||||||
echo '----build image start----'
|
echo '----build image start----'
|
||||||
docker build -t smartopsweb:latest .
|
docker build -t smartopsweb:latest .
|
||||||
echo '----build image success----'
|
echo '----build image success----'
|
||||||
docker run --name smartopsweb --restart=always -d -p 28081:80 smartopsweb:latest
|
docker run --name smartopsweb --link smartopsserver --restart=always -d -p 28081:80 smartopsweb:latest
|
||||||
|
|
||||||
|
|||||||
14
nginx.conf
14
nginx.conf
@@ -29,6 +29,20 @@ http {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
|
|
||||||
|
location /api {
|
||||||
|
proxy_pass http://smartopsserver:8080;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
rewrite "^/api/(.*)$" /$1 break;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
|
client_max_body_size 30m;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /home/clay;
|
root /home/clay;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|||||||
Reference in New Issue
Block a user