Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nginx front-end f1 conf
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
You can’t perform that action at this time.