如何更改浏览器中访问 Nagios 的路径?

cwd*_*cwd 2 nagios apache-2.2

我通常在 mysite.com/nagios3/ 上访问 nagios,但如何更改它?

在 /etc/nagios3/apache2.conf 文件中有这些(和其他)变量:

ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3

# Where the stylesheets (config files) reside
Alias /nagios3/stylesheets /etc/nagios3/stylesheets

# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs
Run Code Online (Sandbox Code Playgroud)

我把它们改成这样:

ScriptAlias /cgi-bin/test /usr/lib/cgi-bin/nagios3
ScriptAlias /test/cgi-bin /usr/lib/cgi-bin/nagios3

# Where the stylesheets (config files) reside
Alias /test/stylesheets /etc/nagios3/stylesheets

# Where the HTML pages live
Alias /test /usr/share/nagios3/htdocs
Run Code Online (Sandbox Code Playgroud)

然后我可以在 mysite.com/test 访问 nagios - 但是图像没有加载,因为它们仍然在 /nagios3/images/...

小智 5

编辑/etc/nagios3/cgi.cfg并设置:

url_html_path=/test
Run Code Online (Sandbox Code Playgroud)