Semaphore behind nginx proxy #2192
Replies: 3 comments 3 replies
-
I believe it is a standard configuration and someone already implemented such. Your assistance is appreciated. |
Beta Was this translation helpful? Give feedback.
-
This is my config:
|
Beta Was this translation helpful? Give feedback.
-
Thanks JtheBAB for your response.
p.s. It works fine if we hit http://local_URL:4000 Here is the snippet from nginx.conf: Ansible Semaphore Application Serverlocation /semaphore { Any suggestion? |
Beta Was this translation helpful? Give feedback.
-
We have semaphore (v2.10.11) deployed as a docker container with following parameters:
ports:
environment:
SEMAPHORE_WEB_ROOT: /semaphore
And it is working fine.
We have deployed nginx and configured (on port 8080) as a reverse proxy with following:
location /semaphore/ {
proxy_pass http://127.0.0.1:4000/;
proxy_set_header Host $http_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-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
rewrite ^/semaphore/(.*) /$1 break;
}
But we are getting an empty page with following error in nginx log:
127.0.0.1 - - [15/Jul/2024:08:51:36 +0000] "GET /semaphore/js/app.3c43688b.js HTTP/1.1" 404 10 "http://localhost:8080/semaphore/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" "-"
127.0.0.1 - - [15/Jul/2024:08:51:36 +0000] "GET /semaphore/js/chunk-vendors.46072356.js HTTP/1.1" 404 10 "http://localhost:8080/semaphore/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" "-"
127.0.0.1 - - [15/Jul/2024:08:51:36 +0000] "GET /semaphore/css/app.bec6951a.css HTTP/1.1" 404 10 "http://localhost:8080/semaphore/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" "-"
127.0.0.1 - - [15/Jul/2024:08:51:36 +0000] "GET /semaphore/css/chunk-vendors.a54f31b2.css HTTP/1.1" 404 10 "http://localhost:8080/semaphore/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" "-"
Looking forward for any assistance here.
Beta Was this translation helpful? Give feedback.
All reactions