Page 2 of 2
Re: Forbidden You don't have permission to access /nagios3/
Posted: Thu May 23, 2013 1:48 pm
by abrist
What are the contents of your server's .htaccess file?
Have you tried adding :
To the Options directive of your nagios vhost file:
Code: Select all
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
Options FollowSymLinks Indexes
[snip]
Re: Forbidden You don't have permission to access /nagios3/
Posted: Thu May 23, 2013 2:58 pm
by lmiltchev
I installed nagios3 on Debian 6.0 and my "/etc/apache2/sites-available/default" file is a bit different.
Code: Select all
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Did you modify this file?
Can you try creating a new user, and log in as this user?
Code: Select all
htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin
Re: Forbidden You don't have permission to access /nagios3/
Posted: Thu May 30, 2013 8:21 pm
by kalianto
When running Apache Web Server, it is a secure approach to run the apache as apache user, i.e. "nobody" or "www-data"
Your document root "/var/www/html" should be set to "www-data" or whatever apache user is, instead of root.
Your nagios web folder, should have owner "nagios" and group "www-data"
It's best if you download nagios from nagios.org, extract it following the installation instruction/document.
It gives you more control than using apt-get
Re: Forbidden You don't have permission to access /nagios3/
Posted: Fri May 31, 2013 9:33 am
by abrist
kalianto wrote:It's best if you download nagios from nagios.org, extract it following the installation instruction/document.
It gives you more control than using apt-get
Agreed. Some of the distro packages are wonky, they do things their own way. Configuring vhosts should be a simple procedure for nagios, but the debian vhost config is a mess. Additionally, we will best be able to support your issues if you do a source-based install.