Open alkanlab opened 1 year ago
Greetings.
Can you please verify if the web-page does open correctly when accessing port 3000 directly? (without nginx) Just to get to know if your installation works at all.
- AnsibleGuy
Greetings.
Can you please verify if the web-page does open correctly when accessing port 3000 directly? (without nginx) Just to get to know if your installation works at all.
- AnsibleGuy
Hi @ansibleguy ,
Web page is working correctly with direct access. There is no issue with that.
@alkanlab it is nginx configuration issue. Please google "mime type nginx".
@alkanlab I've tested the same config you provided and had no such issues. (using nginx version 1.18.0-6ubuntu14.4)
Make sure your nginx has the line include /etc/nginx/mime.types;
in its config (mine has it in /etc/nginx/nginx.conf)
Hi @ansibleguy,
Thanks for testing and back to me. I forgot to tell you my Nginx is working on docker with version nginx version: nginx/1.25.1
and include /etc/nginx/mime.types;
is already added but I am getting still same error.
I have also another Nginx host which is directly running on Ubuntu 22.04 not docker. And if I put my Nginx config on it and change my dns to point to this Nginx it is working correctly. I think Nginx on docker has need additional configuration for semaphore.
It's really strange because I have lot of docker container working behind same docker Nginx and only semaphore is not.
I need to investigate deeply again on Nginx on docker. I hope I will find a solution.
Thanks for helping.
Also facing the exact same issue. Any updates?
Alright, I managed it by adding SEMAPHORE_WEB_ROOT=/semaphore
to the docker-compose file and in the nginx config like this
location /semaphore {
proxy_pass http://ansible-semaphore:3000;
#rewrite ^(.*)$ $1? break;
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;
add_header 'Access-Control-Allow-Origin' 'http://10.66.1.110' always;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
}
location /semaphore/api/ws {
proxy_pass http://ansible-semaphore:3000/api/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";
}
Hi,
Yesterday I installed Semaphore with docker. I installed it on MySql and there was no error. I put Semaphore ui behind Nginx proxy and I am getting below error in my browser.
This is my docker configuration
Below logs from semaphore container
and this is my nginx server section
Below logs from the nginx
Is someone else faced same issue or how can I fix that ?
Thanks.