1 changed files with 17 additions and 11 deletions
@ -1,19 +1,25 @@ |
|||||||
upstream api { |
upstream api { |
||||||
server 127.0.0.1:8080; |
server 127.0.0.1:8080; |
||||||
} |
} |
||||||
|
|
||||||
server { |
server { |
||||||
listen 0.0.0.0:80; |
listen *:80; |
||||||
root /var/www/etc2pool; |
listen [::]:80; |
||||||
index index.html index.htm; |
root /var/www/etc2pool; |
||||||
|
|
||||||
server_name localhost; |
index index.html index.htm index.nginx-debian.html; |
||||||
|
server_name _; |
||||||
|
|
||||||
location /api { |
location / { |
||||||
proxy_pass http://127.0.0.1:8080; |
try_files $uri $uri/ =404; |
||||||
} |
} |
||||||
|
|
||||||
location / { |
location /api { |
||||||
try_files $uri $uri/ /index.html; |
proxy_pass http://api; |
||||||
} |
proxy_set_header Host $host; |
||||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||||
|
proxy_set_header X-Forwarded-Proto $scheme; |
||||||
|
} |
||||||
} |
} |
||||||
|
|
||||||
|
|||||||
Loading…
Reference in new issue