2020-11-05 15:35:56 +00:00
|
|
|
server {
|
2020-12-11 16:47:31 +00:00
|
|
|
listen ${SNIKKET_TWEAK_HTTP_PORT};
|
|
|
|
listen [::]:${SNIKKET_TWEAK_HTTP_PORT};
|
2020-11-05 15:35:56 +00:00
|
|
|
|
2020-12-11 16:47:31 +00:00
|
|
|
server_name ${SNIKKET_DOMAIN};
|
|
|
|
server_name groups.${SNIKKET_DOMAIN};
|
|
|
|
server_name share.${SNIKKET_DOMAIN};
|
2020-11-05 15:35:56 +00:00
|
|
|
|
2021-01-22 15:04:06 +00:00
|
|
|
root /var/www/html;
|
|
|
|
|
2020-11-05 15:35:56 +00:00
|
|
|
location / {
|
2021-01-22 21:49:12 +00:00
|
|
|
try_files $uri /static/$uri @portal;
|
2021-01-22 15:04:06 +00:00
|
|
|
}
|
|
|
|
|
2021-01-22 22:59:59 +00:00
|
|
|
location /admin_api {
|
|
|
|
try_files none @prosody;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /invite {
|
|
|
|
try_files none @prosody;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /invites_api {
|
|
|
|
try_files none @prosody;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /oauth2 {
|
|
|
|
try_files none @prosody;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /register {
|
|
|
|
try_files none @prosody;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /rest {
|
|
|
|
try_files none @prosody;
|
|
|
|
}
|
|
|
|
|
2021-01-22 22:14:46 +00:00
|
|
|
location /share {
|
|
|
|
alias /usr/share/javascript;
|
2021-01-22 17:03:16 +00:00
|
|
|
}
|
|
|
|
|
2021-01-22 22:59:59 +00:00
|
|
|
location /upload {
|
|
|
|
try_files none @prosody;
|
|
|
|
}
|
|
|
|
|
2021-01-22 15:04:06 +00:00
|
|
|
location @portal {
|
|
|
|
proxy_pass http://localhost:${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_PORT};
|
2020-11-05 15:35:56 +00:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
2021-01-22 15:04:06 +00:00
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
2020-11-05 15:35:56 +00:00
|
|
|
}
|
2021-01-22 13:00:27 +00:00
|
|
|
|
2021-01-22 22:59:59 +00:00
|
|
|
location @prosody {
|
|
|
|
proxy_pass http://localhost:${SNIKKET_TWEAK_INTERNAL_HTTP_PORT};
|
2021-01-22 15:04:06 +00:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
2021-01-22 13:00:27 +00:00
|
|
|
}
|
2020-11-05 15:35:56 +00:00
|
|
|
}
|