Announcement

Collapse
No announcement yet.

Alias Directive in httpd.conf not match

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alias Directive in httpd.conf not match

    First up, Hi.

    Second:


    I am a newbie to Linux.
    I am running Ubuntu Dapper 6.06
    I have been dealing with Nagios since Monday.
    I have attempted Nagios stand alone, Nagios + check_mrtgtraf, install NSClient and SNMP4Nagios.
    ---- Up through check_mrtgtraf had no problems but the SNMP4Nagios has me stuck on I think a compile issue dealing with Net-SNMP.

    Today I turned to Oreon.

    Install has been a breeze. I can't begin to express just how helpful that wiki has been....the clarity has been amazing. The only thing missing was reference to mail and PEAR but that was a quick find with google.....probably a result of using Ubuntu
    -- you need to (apt-get install) mailx and php4-pear

    I'm down to section VII. The Web Setup on http://wiki.oreon-project.org/wakka.php?wiki=SeTupEN

    Unfortunately I get 404 errors w/
    localhost/oreon
    and
    localhost/oreon/install/setup.php

    My terminal had this to say when I restarted apache:
    Code:
    * Forcing reload of apache 2.0 web server...
    [Thu Aug 03 15:27:29 2006 [warn] The ScriptAlias directive in /etc/apache2/httpd.conf at line 34 will probably never match because it overlaps an earlier ScriptAlias.
    [Thu Aug 03 15:27:29 2006 [warn] The ScriptAlias directive in /etc/apache2/httpd.conf at line 42 will probably never match because it overlaps an earlier ScriptAlias.
    apache2: Could not determin the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Thu Aug 03 15:27:30 2006 [warn] The ScriptAlias directive in /etc/apache2/httpd.conf at line 34 will probably never match because it overlaps an earlier ScriptAlias.
    [Thu Aug 03 15:27:30 2006 [warn] The ScriptAlias directive in /etc/apache2/httpd.conf at line 42 will probably never match because it overlaps an earlier ScriptAlias.
    apache2: Could not determin the server's fully qualified domain name, using 127.0.0.1 for ServerName
    I tried replacing "localhost" with "127.0.0.1" but no such luck

    The lines in question state:
    Code:
    34: ScripAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
    42: Alias /nagios/ /usr/local/nagios/share/
    My earlier manual install of Nagios is still up and running and I really don't want to disturb it atm. It happens to be installed at /nagios

    I figure it's pretty simple to change the httpd.conf to _something_ and then match the change in the URL of my browser and perhaps in another file or two...but I'm not sure what I can or should change it to.

    Unlike my manual install earlier, the Oreon install has been left to all defaults.

    Thanks,
    NC


    *edit*

    I've included my httpd.conf file below (it's relatively short). After I posted I took another look at the .conf file and noticed there were two entries for each *Alias. They are pretty close with one group having a few additional extras. Is there anyway I can keep both by changing the directory listing of one of the groups (with a corresponding change in URL I'm guessing) or should I comment out one...and which one?

    The httpd.conf file:
    Code:
    # This is here for backwards compatability reasons and to support
    #  installing 3rd party modules directly via apxs2, rather than
    #  through the /etc/apache2/mods-{available,enabled} mechanism.
    #
    #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so 
    
    ScriptAlias /nagios/cgi-bin /nagios/sbin
    
    <Directory "/nagios/sbin">
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic 
    AuthUserFile /nagios/etc/htpasswd.users
    Require valid-user
    </Directory>
    
    Alias /nagios /nagios/share
    
    <Directory "/nagios/share">
    Options None
    AllowOverride None
    Order allow,deny 
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /nagios/etc/htpasswd.users
    Require valid-user
    </Directory>
    #Section added by Oreon Team
    
    ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/ 
    <Directory "/usr/local/nagios/sbin/">
        AllowOverride AuthConfig
        Options ExecCGI
        Order allow,deny
        Allow from all
    </Directory>
    
    Alias /nagios/ /usr/local/nagios/share/ 
    <Directory "/usr/local/nagios/share">
        Options None
        AllowOverride AuthConfig
        Order allow,deny
        Allow from all
    </Directory>

  • #2
    my apache2.log has
    File does not exist: /var/www/oreon

    ?

    I ran find -name setup.php and see that
    ./tmp/oreon-1.3-RC3-1/www/install/setup.php
    .usr/local/oreon/www/install/setup.php

    Did I place something wrong or not link files or somesuch?
    And can I simply move the www/install/... into the /var directory? or how to I get to the 2nd location above through the web browser?

    Comment


    • #3
      Well if anyone has an answer great otherwise I just reinstall Ubuntu (didn't know how to uninstall anything) and reinstalled only the Oreon packages described in http://wiki.oreon-project.org/wakka.php?wiki=SeTupEN

      Comment


      • #4
        Similar Problem did you solve it? Please help

        Hi i have downloaded the nagios and oreon install from the net and gone through the installer problem free.

        however I cannot finish installatio as i acnnot access the wesite

        http://servername/oreon/
        or
        http://servername/oreon/install/setup.php

        I can access http://servername/ which shows apache is running
        I can also acced http://servername/nagios/ which shows nagioa installed ok


        Ant ideas . I am quite new to all this .


        regards


        ED

        Comment


        • #5
          Let's try to answer all things:

          - NetCog, about your config, I believe you are posting a part of httpd.conf file, don't you? That's the reason for the server's fully qualified domain name warning. You have posted no lines about server configuration, and the server is getting by defect variables such as 127.0.0.1 server name (127.0.0.1 is exactly the same as localhost). The other warnings are about double definition of Alias and ScriptAlias in your httpd.conf file.

          Alias /nagios and ScriptAlias /nagios/cgi-bin are setup twice in the file, so apache would only process first entries for Alias /nagios and ScriptAlias /nagios/cgi-bin. Fisrt entries were setted up by Nagios, secondary entries were setted up by Oreon.

          You're missing Oreon entries in httpd.conf, something like:

          Code:
              
              Alias /oreon/ /usr/local/oreon/www/
              <Directory "/usr/local/oreon/www">
                  Options None
                  AllowOverride AuthConfig
                  Order allow,deny
                  Allow from all
              </Directory>
          So apache does not understand where to go to get oreon frontend files.

          - ed300900
          Please, post attached apache error log file to make a better idea of what is happening. Also post attached httpd.conf file.
          [Linux 2.4.20-28.7 - RedHat 7.2]
          [Linux 2.6.16.21-0.25 - OpenSuSE 10.1]
          [Apache 1.3.x, PHP 5.x, MySQL 5.x]
          [Apache 2.2.x, PHP 5.x, MySQL 5.x]
          [Nagios 1.4.1+Nagmin -Production-, Nagios 2.5+Oreon 1.3.1-1 -PreProduction-, Nagios 2.5+Oreon 1.3.1-1 -Testing-]

          Comment


          • #6
            Manage to get it working. looks like a PDH4 Apache2 configuation .

            Very good website http://www.debianhelp.co.uk/apachephp.htm

            -----------------------------------------------------------------------------------

            DirectoryIndex index.html index.htm index.shtml index.cgi index.pl index.php index.php4 index.xhtml

            and add these two lines in the section where you can find AddType and AddHandler directives

            AddHandler php-script .php4
            Action php-script /cgi-bin/php4

            This will make sure that PHP files with the extension .php4 are executed as CGI. PHP files with the extension .php will be run by the Apache2-PHP5 module.

            Next, we have to enable a few Apache modules, like for example the actions module otherwise we cannot run PHP4 as CGI

            #a2enmod actions ssl rewrite suexec include

            Now you need to restart your apache server using the following command

            #/etc/init.d/apache2 restart

            Comment

            Working...
            X