3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 13:51:51 +00:00
zeppelin/docker/development/nginx/default.conf

40 lines
1 KiB
Text
Raw Permalink Normal View History

2022-06-01 19:11:44 +03:00
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
2022-06-26 19:30:46 +03:00
server_name localhost;
2022-06-01 19:11:44 +03:00
2022-06-26 19:30:46 +03:00
root /zeppelin/dashboard/dist;
2022-06-26 15:23:53 +03:00
2022-06-01 19:11:44 +03:00
location / {
2022-06-26 19:30:46 +03:00
index index.html;
try_files $uri $uri/ /index.html;
2022-06-01 19:11:44 +03:00
}
2022-06-26 19:30:46 +03:00
# Using a variable here stops nginx from crashing if the dev container is restarted or becomes otherwise unavailable
set $backend_upstream "http://devenv:_API_PORT_";
2022-06-01 19:11:44 +03:00
2022-06-26 19:30:46 +03:00
location /api {
# Remove /api/ from the beginning when passing the path to the API process
rewrite /api(/.*)$ $1 break;
2022-06-01 19:11:44 +03:00
2022-06-26 19:30:46 +03:00
# Using a variable in proxy_pass also requires resolver to be set.
# This is the address of the internal docker compose DNS server.
resolver 127.0.0.11;
2022-06-01 19:11:44 +03:00
2022-06-26 19:30:46 +03:00
proxy_pass $backend_upstream$uri$is_args$args;
proxy_redirect off;
2022-06-01 19:11:44 +03:00
2022-06-26 19:30:46 +03:00
client_max_body_size 200M;
2022-06-01 19:11:44 +03:00
}
2022-06-26 19:30:46 +03:00
ssl_certificate /etc/ssl/certs/localhost-cert.pem;
ssl_certificate_key /etc/ssl/private/localhost-cert.key;
2022-06-01 19:11:44 +03:00
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
ssl_session_tickets off;
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers off;
}