all Virtualhosts point to phpMyAdmin

Discussion in 'Server Operation' started by Musty, Mar 7, 2008.

  1. Musty

    Musty New Member

    I installed F7 with webmin and configured my hosts file as follow:

    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    192.168.2.3 mydomain.org mydomain
    192.168.2.3 sql.mydomain.org sql
    192.168.2.3 mail.mydomain.org mail
    192.168.2.3 smtp.mydomain.org smtp
    192.168.2.3 pop.mydomain.org pop
    192.168.2.3 www.mydomain.org www
    192.168.2.3 alcboard.ath.cx free1
    ::1 localhost6.localdomain6 localhost6


    First I installed phpmyadmin and set a virtualhost to point to it this way:

    <VirtualHost *>
    DocumentRoot /var/www/html/phpMyAdmin
    ServerName sql.mydomain.org
    <Directory "/var/www/html/phpMyAdmin">
    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>

    works fine! I get phpmyadmin login box and I can access it just fine.

    Then I set a second Vhost this way:

    <VirtualHost *>
    DocumentRoot /var/www/html/dbm
    ServerName www.mydomain.org
    <Directory "/var/www/html/dbm">
    allow from all
    Options +Indexes
    </Directory>
    </VirtualHost>

    when I type www.mydomain.org I get phpmyadmin although directory is different.

    Did I do anything wrong? Any help would be appreciated.

    Thanks
     
  2. Musty

    Musty New Member

    More on this problem.

    I run Virtualhost configuration check and this is what I got:

    [[email protected]~]# /usr/sbin/httpd -S
    VirtualHost configuration:
    wildcard NameVirtualHosts and _default_ servers:
    _default_:443 localhost (/etc/httpd/conf.d/ssl.conf:81)
    *:80 is a NameVirtualHost
    default server sql.mydomain.org (/etc/httpd/conf/httpd.conf:991)
    port 80 namevhost sql.mydomain.org (/etc/httpd/conf/httpd.conf:991)
    port 80 namevhost www.mydomain.org (/etc/httpd/conf/httpd.conf:998)
    Syntax OK

    I am just wondering why sql.mydomain.org is mentioned twice. 1 as a default server and 1 as a Vhost?

    Thanks
     
  3. Musty

    Musty New Member

    Sorted out! :)

    That was just a stupid thing. I found out I had assigned the site 192.168.2.8 in the network card hosts instead of the server's IP 192.168.2.3.

    Sorry for bothering. :cool:
     

Share This Page