Skip to content

Instantly share code, notes, and snippets.

@jwreagor
Last active August 19, 2019 19:51
Show Gist options
  • Save jwreagor/eb840b212f6a36fc8bc0f25a0f86e959 to your computer and use it in GitHub Desktop.
Save jwreagor/eb840b212f6a36fc8bc0f25a0f86e959 to your computer and use it in GitHub Desktop.
Nginx configuration for fronting OVH CDS UI
server {
listen 80;
listen [::]:80;
root /opt/cds/dist;
index index.html;
location /assets/worker/cdsapi/events {
gzip_static off;
}
location /cdsapi {
rewrite /cdsapi/(.*) /$1 break;
proxy_pass http://$BACKEND_HOST:8081;
proxy_redirect off;
proxy_set_header Host $host;
}
location /assets/worker/cdsapi {
rewrite /assets/worker/cdsapi/(.*) /$1 break;
proxy_pass http://$BACKEND_HOST:8081;
proxy_redirect off;
proxy_set_header Host $host;
}
location /assets/worker/web/cdsapi {
rewrite /assets/worker/web/cdsapi/(.*) /$1 break;
proxy_pass http://$BACKEND_HOST:8081;
proxy_redirect off;
proxy_set_header Host $host;
}
location / {
try_files $uri $uri/ /index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment