|
|
|
|
@ -3,17 +3,23 @@ upstream api {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
server { |
|
|
|
|
listen 0.0.0.0:80; |
|
|
|
|
listen *:80; |
|
|
|
|
listen [::]:80; |
|
|
|
|
root /var/www/etc2pool; |
|
|
|
|
index index.html index.htm; |
|
|
|
|
|
|
|
|
|
server_name localhost; |
|
|
|
|
index index.html index.htm index.nginx-debian.html; |
|
|
|
|
server_name _; |
|
|
|
|
|
|
|
|
|
location /api { |
|
|
|
|
proxy_pass http://127.0.0.1:8080; |
|
|
|
|
location / { |
|
|
|
|
try_files $uri $uri/ =404; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
location / { |
|
|
|
|
try_files $uri $uri/ /index.html; |
|
|
|
|
location /api { |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|