snikket-web-proxy/nginx/http.template

29 lines
844 B
Plaintext

server {
listen ${SNIKKET_TWEAK_HTTP_PORT};
listen [::]:${SNIKKET_TWEAK_HTTP_PORT};
server_name ${SNIKKET_DOMAIN};
server_name groups.${SNIKKET_DOMAIN};
server_name share.${SNIKKET_DOMAIN};
root /var/www/html;
location / {
try_files $uri @portal;
}
location @portal {
proxy_pass http://localhost:${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_PORT};
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /_/ {
proxy_pass http://localhost:${SNIKKET_TWEAK_INTERNAL_HTTP_PORT}/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}