Files
gemory/nginx.conf.template
2023-12-03 16:34:48 +01:00

70 lines
2.4 KiB
Plaintext

server {
listen 80 http2;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ $uri.html /index.html;
}
location /marbas/ {
proxy_pass https://${MARBAS_URL}/;
proxy_http_version 1.1;
rewrite /marbas/(.*) /$1 break;
proxy_ssl_server_name on;
proxy_set_header Host "${MARBAS_URL}";
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Accept-Encoding "";
sub_filter 'https://${MARBAS_URL}/' '/marbas/';
sub_filter 'http://${MARBAS_URL}/' '/marbas/';
sub_filter_once off;
sub_filter_types application/json;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /pocketbase/ {
proxy_pass https://${POCKET_BASE_URL}/;
proxy_http_version 1.1;
rewrite /pocketbase/(.*) /$1 break;
proxy_ssl_server_name on;
proxy_set_header Host "${POCKET_BASE_URL}";
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /evepraisal/ {
proxy_pass https://${EVEPRAISAL_URL}/;
proxy_http_version 1.1;
rewrite /evepraisal/(.*) /$1 break;
proxy_ssl_server_name on;
proxy_set_header Host "${EVEPRAISAL_URL}";
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /fuzzwork/ {
proxy_pass https://${FUZZWORK_URL}/;
proxy_http_version 1.1;
rewrite /fuzzwork/(.*) /$1 break;
proxy_ssl_server_name on;
proxy_set_header Host "${FUZZWORK_URL}";
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /esi/ {
proxy_pass https://esi.evetech.net/;
proxy_http_version 1.1;
rewrite /esi/(.*) /latest/$1 break;
proxy_ssl_server_name on;
proxy_set_header Host "esi.evetech.net";
proxy_set_header X-Forwarded-Proto https;
proxy_set_header User-Agent "${ESI_USER_AGENT}";
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location @handle_redirects {
set $saved_redirect_location '$upstream_http_location';
proxy_pass $saved_redirect_location;
}
}