Created
August 9, 2020 10:12
-
-
Save Todorovikj/e4fac42fd3a2cdb18b73aef6dd4a0aa3 to your computer and use it in GitHub Desktop.
Nginx front-end f1 conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 0.0.0.0:4200; | |
server_name f1-angular; | |
index index.html index.htm; | |
access_log /var/log/nginx/default_access.log; | |
error_log /var/log/nginx/default_error.log; | |
root /usr/share/nginx/html; | |
gzip on; | |
gzip_proxied any; | |
gzip_types | |
text/css | |
text/javascript | |
text/xml | |
text/plain | |
application/javascript | |
application/x-javascript | |
application/json; | |
location /api/{ | |
proxy_pass http://f1-backend:8080; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
} | |
location / { | |
gzip_static on; | |
try_files $uri $uri/ $uri$args $uri?$args $uri$args/ /index.html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment