# Nagios, getting the CGI part to run

## Arioch84

Hi folks,

I've managed to get Nagios to load, but whenever I try to open a monitoring page on the web interface I run into permisson errors.

```

# /etc/init.d/nagios start

 * Starting nagios ...

#

```

```

Forbidden

You don't have permission to access /nagios/cgi-bin/status.cgi on this server.
```

Perl is enabled in the Apache config and mod mime should be ok too:

```

APACHE2_OPTS="-D DEFAULT_VHOST -D PHP5 -D PERL"

```

```
AddHandler cgi-script .cgi
```

Httpd.conf entries:

```

<Directory "/usr/nagios/sbin">

    Options ExecCGI

    AllowOverride None

    Order allow,deny

    Allow from all

    AuthName "Nagios Access"

    AuthType Basic

    AuthUserFile /etc/nagios/htpasswd.users

    Require valid-user

</Directory>

Alias /nagios /usr/nagios/share

<Directory "/usr/nagios/share">

    Options None

    AllowOverride None

    Order allow,deny

    Allow from all

    AuthName "Nagios Access"

    AuthType Basic

    AuthUserFile /etc/nagios/htpasswd.users

    Require valid-user

</Directory>

```

As for the permissions, they should be ok too:

```

# chown apache:apache /etc/nagios/htpasswd.users

# chmod 640 /etc/nagios/htpasswd.users

# chmod 640 /usr/nagios/sbin/.htaccess

# chown apache:apache /usr/nagios/sbin/.htaccess

```

I can't seem to find anything related in my logs. Any ideas on how to fix this?

----------

## Arioch84

Problem solved already!

The Nagios cgi dir was installed in /usr/nagios/sbin instead of /usr/local/nagios/sbin.

Must've missed seen over that one a hundred times. Silly me!  :Embarassed: 

----------

