diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 1c65bf2..0b25252 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -66,7 +66,9 @@ http { gzip_static on; add_header Pragma public; add_header Cache-Control "public, max-age=0, must-revalidate, proxy-revalidate"; - try_files $uri =404; + if (!-f $request_filename) { + rewrite ^/([a-z0-9A-Z]+)/(.*) /$2 break; + } } location ~ \.pl$ { @@ -77,7 +79,7 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } - location /erp/api/ { + location ~ ^(/[a-z0-9A-Z]+)?/erp/api/ { proxy_pass http://lsmb:5762; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host;