Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been moving my nagios on apaches virtualhost and adding the following configuration file

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName  nagios.example.com
    ServerAlias nagios.example.com         
    DocumentRoot /usr/local/nagios/share
    ScriptAlias /cgi-bin/nagios /usr/local/nagios/sbin
    ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin 


    # Where the stylesheets (config files) reside
    #Alias /nagios/stylesheets /usr/local/nagios/share 

    # Where the HTML pages live
    Alias /nagios  /usr/local/nagios/share

    <Directory  /usr/local/nagios/share>
        Options FollowSymLinks
        DirectoryIndex index.php
        AllowOverride AuthConfig
        Order Allow,Deny
        Allow From All

        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /etc/nagios3/htpasswd.users
        require valid-user
    </Directory>

    </VirtualHost>

When I browse the page I'm getting the following error: The requested URL /cgi-bin/tac.cgi was not found on this server. Checking the scriptaliases routes everything seems to be alright. Clicking inside of a menu the cgi problem do not persist, just on page browsing.

share|improve this question

2 Answers 2

Your Configuration file looks alright just comment the line "Alias /nagios /usr/local/nagios/share", Because you are already defining the DocumentRoot thus this line is making conflict with in your path defining for Nagios.

share|improve this answer

I'm running Ubuntu 12.04 and in order to fix the initial tac.cgi error you have to edit a line in the index.html and index.php files to the following.

frame src="/nagios/cgi-bin/tac.cgi" name="main" />

After that the initial page will load correctly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.