Find the answer to your Linux question:
Results 1 to 5 of 5
Hi folks, Ubuntu 8.04 Apache2 phymyadmin On running; # apache2ctl -t Code: [Sat Apr 25 07:57:02 2009] [warn] The Alias directive in /etc/apache2/sites-enabled/400-phpmyadmin at line 3 will probably never match ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787

    phpmyadmin : how to fix the warning


    Hi folks,


    Ubuntu 8.04
    Apache2
    phymyadmin


    On running;

    # apache2ctl -t
    Code:
    [Sat Apr 25 07:57:02 2009] [warn] The Alias directive in /etc/apache2/sites-enabled/400-phpmyadmin at line 3 will probably never match because it overlaps an earlier Alias.
    Syntax OK
    and

    # /etc/init.d/apache2 reload
    Code:
     * Reloading web server config apache2                                                 [Sat Apr 25 07:57:11 2009] [warn] The Alias directive in /etc/apache2/sites-enabled/400-phpmyadmin at line 3 will probably never match because it overlaps an earlier Alias.
                                                                                    [ OK ]
    A warning popup.


    # cat /etc/apache2/sites-enabled/400-phpmyadmin
    Code:
    # phpMyAdmin default Apache configuration
    
    Alias /phpmyadmin /usr/share/phpmyadmin
    
    <Directory /usr/share/phpmyadmin>
            Options Indexes FollowSymLinks
            DirectoryIndex index.php
    
            # Authorize for setup
            <Files setup.php>
                # For Apache 1.3 and 2.0
                <IfModule mod_auth.c>
                    AuthType Basic
                    AuthName "phpMyAdmin Setup"
                    AuthUserFile /etc/phpmyadmin/htpasswd.setup
                </IfModule>
                # For Apache 2.2
                <IfModule mod_authn_file.c>
                    AuthType Basic
                    AuthName "phpMyAdmin Setup"
                    AuthUserFile /etc/phpmyadmin/htpasswd.setup
                </IfModule>
                Require valid-user
            </Files>
            <IfModule mod_php4.c>
                    AddType application/x-httpd-php .php
    
                    php_flag magic_quotes_gpc Off
                    php_flag track_vars On
                    php_flag register_globals Off
                    php_value include_path .
            </IfModule>
            <IfModule mod_php5.c>
                    AddType application/x-httpd-php .php
    
                    php_flag magic_quotes_gpc Off
                    php_flag track_vars On
                    php_flag register_globals Off
                    php_value include_path .
            </IfModule>
    </Directory>
    However it doesn't affect running phymyadmin. On the web browser of a remote machine;

    http://domain.com/phpmyadmin

    can start the login page and login.


    Please advise where shall I check? How to fix the warning? TIA


    B.R.
    satimis

  2. #2
    Just Joined!
    Join Date
    May 2009
    Location
    Philippines
    Posts
    2
    Hi Satimis,

    Can you check your httpd.conf and look for an alias /phpmyadmin ?

    It says on the warning message that "it overlaps an earlier Alias."

    Try to locate and comment it out and let see if the warning will stop.

    ---
    Best Regards,
    Ranged
    Jr. Linux Administrator

  3. #3
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787
    Hi Ranged,


    On checking the notes;

    First I ran;
    ln -s /etc/apache2/sites-available/squirrelmail /etc/apache2/sites-enabled/500-squirrelmail

    # vi /etc/apache2/sites-available/squirrelmail
    comment out following line;
    #Alias /squirrelmail /usr/share/squirrelmail

    make following change;
    DocumentRoot /usr/share/squirrelmail (uncomment)
    ServerName vz2.satimis.com (uncomment and change servername)

    # apache2ctl -t
    Code:
    Syntax OK
    # /etc/init.d/apache2 reload
    Code:
     * Reloading web server config apache2                           [ OK ]
    There is no problem.

    Then I further proceed;

    # ln -s /etc/apache2/sites-available/phpmyadmin /etc/apache2/sites-enabled/400-phpmyadmin

    # apache2ctl -t
    Code:
    [Sat Apr 25 06:43:26 2009] [warn] The Alias directive in /etc/apache2/sites-enabled/400-phpmyadmin at line 3 will probably never match because it overlaps an earlier Alias.
    Syntax OK
    # /etc/init.d/apache2 reload
    Code:
     * Reloading web server config apache2                                           [Sat Apr 25 06:44:02 2009] [warn] The Alias directive in /etc/apache2/sites-enabled/400-phpmyadmin at line 3 will probably never match because it overlaps an earlier Alias.
                                                                              [ OK ]
    Warning popup.


    Quote Originally Posted by ranged View Post

    Can you check your httpd.conf and look for an alias /phpmyadmin ?

    It says on the warning message that "it overlaps an earlier Alias."

    Try to locate and comment it out and let see if the warning will stop.
    /etc/apache2/httpd.conf is an empty file. On which file shall I copy content on it? TIA


    B.R.
    satimis

  4. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,497
    On some distros that file can be found at /etc/httpd/httpd.conf
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  5. #5
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,787
    Quote Originally Posted by elija View Post
    On some distros that file can be found at /etc/httpd/httpd.conf
    # find / -name httpd -type d
    No printout

    /# locate httpd.conf
    Code:
    /etc/apache2/httpd.conf
    /etc/phpmyadmin/lighttpd.conf

    # cat /etc/phpmyadmin/lighttpd.conf
    Code:
    alias.url += ( 
    	"/phpmyadmin" => "/usr/share/phpmyadmin",
    )
    
    $HTTP["url"] =~ "^/phpmyadmin/scripts/setup.php" {
    	auth.backend = "plain"
    	auth.backend.plain.userfile = "/etc/phpmyadmin/htpasswd.setup"
    	auth.require = (
    		"/" => (
    			"method" => "basic",
    			"realm" => "phpMyAdmin Setup",
    			"require" => "valid-user"
    		)
    	)
    }
    B.R.
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •