rohit01 / docker_shinken

Automated docker builds for shinken images
http://www.rohit.io/blog/rip-nagios-hello-docker-shinken.html
56 stars 41 forks source link

Shinken alwasy redirects to port 80 #28

Open noromamai opened 6 years ago

noromamai commented 6 years ago

I have installed the docker image in a Synology NAS. I tried manual and automatic port mapping (set in the docker UI interface of the NAS). I can reach the shinken webui using http://ip:port/user/login, but after inputting credentials and clicking on login, i am redirected to an url without the port and therefor can not reach anything beyond the login page. going directly to http://ip:port/ will also redirect to url without port.

can i edit the configs somewhere to make shinken webui run on a specified port or use an env variable?

perezale commented 6 years ago

Hi! I was facing the same issue. The nginx service running on port 80 is just a reverse proxy for the actual shinken web server. If you seek inside the "shinken" folder you'll see the shinken_nginx.cfg file. This is the file you should update. The problem is that the docker image is already built and you should rebuild it with docker-compose. (Which didn't build correctly for me) So far, one alternative is to use thruk UI which works ok without any unwanted redirection.

Hope this helps! I'll keep you updated if I make any progress customizing the nginx reverse proxy

Sanafan commented 6 years ago

Facing the same issue right now... i already edited the port inside the shinken_nginx.conf file but this doesn't change anything. I'm not able to run shinken right now on my RS3618xs Synology NAS inside Docker

XonneX commented 5 years ago

Replace proxy_set_header Host $host; with proxy_set_header Host $http_host; in the nginx configuration file at /etc/nginx/sites-enabled/shinken_nginx.conf. $http_post contains the hostname and the requested port.