mirror of
https://github.com/ZeJMaN/shinken_ynh.git
synced 2026-03-28 02:20:22 +01:00
webui2 configuration
installation and configuration of shinken nginx for webui
This commit is contained in:
@@ -1,3 +1,31 @@
|
||||
location /shinken {
|
||||
proxy_pass http://127.0.0.1:7767;
|
||||
}
|
||||
|
||||
}
|
||||
location @webui {
|
||||
root /var/lib/shinken/modules/webui2/;
|
||||
}
|
||||
|
||||
location ~* ^/(all|forms|inner|static|dashboard|availability|logs|widget|cv|user|modal|gotfirstdata|host/cv)$
|
||||
return 301 /shinken$request_uri;
|
||||
}
|
||||
|
||||
location /shinken/ {
|
||||
# Set the variables so that the WebUI will
|
||||
# know what hostname it has, this is useful for redirects
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
#proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
|
||||
# Replace 7767 (default) by the port your shinken webui is listening on
|
||||
proxy_pass http://localhost:7767/;
|
||||
proxy_redirect default;
|
||||
|
||||
# Sub_filter all the occurrences of the page
|
||||
sub_filter_once off;
|
||||
|
||||
# All patterns that should be rewritten
|
||||
sub_filter "href=\"/" "href=\"/shinken/";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user