By default it’s alias: you-domain.com/nagios3 and to do it as standalone site follow below instruction…
a2disconf nagios3
ln -s /etc/nagios3/apache2.conf /etc/apache2/sites-enabled/your-domain.com.conf
- modify this file to look like:
<VirtualHost *:80> ServerAdmin webmaster@example.com ServerName nagios.example.com ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3/ Alias /stylesheets /etc/nagios3/stylesheets/ Alias / /usr/share/nagios3/htdocs/ DocumentRoot /usr/share/nagios3/htdocs/ <DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)> Options FollowSymLinks DirectoryIndex index.php index.html AllowOverride AuthConfig Order Allow,Deny Allow From All AuthName "Nagios Access" AuthType Basic AuthUserFile /path/to/nagios3/htpasswd.users require valid-user </DirectoryMatch> <Directory /usr/share/nagios3/htdocs> Options +ExecCGI </Directory> ErrorLog ${APACHE_LOG_DIR}/nagios.example.com-error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/nagios.example.com-access.log combined </VirtualHost>
- in file
/etc/nagios3/cgi.cfg
changeurl_html_path
from /nagios3 to / service apache2 restart