407eca5414
- Use keepalives - Update deprecated http2 syntax - Document how to check config Refs: - https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/#no-keepalives - https://github.com/nginxinc/kubernetes-ingress/issues/4237 - https://stackoverflow.com/questions/65944578/how-to-get-nginx-running-in-docker-to-reload-nginx-conf-configuration
30 lines
906 B
Text
30 lines
906 B
Text
# This file gets loaded in a top level http block by the default nginx.conf
|
|
# See infra/services/nginx/README.md for more details.
|
|
|
|
upstream museum {
|
|
# https://nginx.org/en/docs/http/ngx_http_upstream_module.html
|
|
server host.docker.internal:8080 max_conns=50;
|
|
|
|
# Keep these many connections alive to upstream (requires HTTP/1.1)
|
|
keepalive 20;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
ssl_certificate /etc/ssl/certs/cert.pem;
|
|
ssl_certificate_key /etc/ssl/private/key.pem;
|
|
|
|
server_name api.ente.io;
|
|
|
|
location / {
|
|
proxy_pass http://museum;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|