|
@@ -1,6 +1,7 @@ |
|
|
server { |
|
|
server { |
|
|
|
|
|
listen 80; |
|
|
{% if domain %} |
|
|
{% if domain %} |
|
|
server_name {{ domain }}; |
|
|
|
|
|
|
|
|
server_name {{ domain }} www.{{ domain }}; |
|
|
{% else %} |
|
|
{% else %} |
|
|
server_name localhost; |
|
|
server_name localhost; |
|
|
{% endif %} |
|
|
{% endif %} |
|
@@ -42,20 +43,32 @@ server { |
|
|
resolver 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=300s; |
|
|
resolver 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=300s; |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
proxy_set_header X-Scheme $scheme; |
|
|
|
|
|
|
|
|
|
|
|
location / { |
|
|
location / { |
|
|
proxy_pass http://frontend:8080; |
|
|
proxy_pass http://frontend:8080; |
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
|
|
proxy_redirect off; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
location /admin/ { |
|
|
location /admin/ { |
|
|
proxy_pass http://backend:8000; |
|
|
proxy_pass http://backend:8000; |
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
|
|
proxy_redirect off; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
location /api/ { |
|
|
location /api/ { |
|
|
proxy_pass http://backend:8000; |
|
|
proxy_pass http://backend:8000; |
|
|
|
|
|
proxy_set_header Host $host; |
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
|
|
proxy_redirect off; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
location /static/ { |
|
|
location /static/ { |
|
|