From 3317ed4576ddc461495cea7d647d4b16d5f4369f Mon Sep 17 00:00:00 2001 From: Erik Huelsmann Date: Sat, 9 Aug 2025 18:27:19 +0200 Subject: [PATCH] Fix nginx.conf; 1.13 supports simultaneous logins on various companies (using paths) --- proxy/nginx.conf | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/proxy/nginx.conf b/proxy/nginx.conf index a8f5cc6..afcf293 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -54,21 +54,23 @@ http { return 301 login.pl; } - # JS & CSS - location ~* \.(js|css)$ { - add_header Pragma "public"; - add_header Cache-Control "public, must-revalidate, proxy-revalidate"; # Production - expires 7d; # Indicate that the resource can be cached for 1 week # Production - try_files $uri =404; + location / { + try_files $uri @strippedprefix @starman; } - location / { + location @strippedprefix { + rewrite ^/([a-z0-9A-Z]+)/(.*) /$2 break; + } + + location @starman { + proxy_pass http://127.0.0.1:5762; + proxy_read_timeout 300; 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-Host $host; + proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Proto $scheme; - proxy_read_timeout 300; - proxy_pass http://127.0.0.1:5762; } } }