Multiple domains

Discussion in 'Installation/Configuration' started by jysse, Aug 10, 2005.

  1. jysse

    jysse New Member

    I have two registered domains. First one is ok but when I select the other one on my browser it goes to first domain page. Like this:
    www.firstdomain.com, works ok, only thing is that ip adrress is shown at the address field instead of normal address ?
    www.seconddomain.com, goes to firstdomain homepage and also shows ip address.
    How can I fix this ?
    Debian 3.1 and ISPConfig and done this by adding a new site.

    Thanx, Jysse

    Vhosts_ispconfig.conf:

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.168.1.2:80
    #
    #
    ######################################
    # Vhost: www.firstdomain.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.2:80>
    ServerName www.firstdomain.com:80
    ServerAdmin webmaster@firstdomain.com
    DocumentRoot /var/www/web1/web
    ServerAlias firstdomain.com
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm ErrorLog /var/www/web1/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 <Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web1/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web1/phptmp/ php_admin_value session.save_path /var/www/web1/phptmp/ Alias /error/ "/var/www/web1/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3 </VirtualHost> # # # ######################################
    # Vhost: www.seconddomain.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.2:80>
    ServerName www.seconddomain.com:80
    ServerAdmin webmaster@seconddomain.com
    DocumentRoot /var/www/web2/web
    ServerAlias seconddomain.com
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm ErrorLog /var/www/web2/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 <Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web2/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web2/phptmp/ php_admin_value session.save_path /var/www/web2/phptmp/ Alias /error/ "/var/www/web2/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3 </VirtualHost> # # #
     
  2. falko

    falko Super Moderator

    What do you enter in your browser's address bar? You must enter an address that's also in the ServerName or ServerAlias directive of the Apache vhost, so for your second vhost that would be http://www.seconddomain.com or http://seconddomain.com. If you enter anything else that points also to your server the Apache doesn't know how to handle this and gives back the first vhost it can find.
     
  3. jysse

    jysse New Member

    Problem continues...

    Thanks for your quick answer :) . I tried to enter address as you suggested. Same problem appears.
    But I did try to investigate some more and I think that there is a problem with name resolving. "Seconddomain" points to a wrong server when I ping it. I have redirected my first domain to my server and it's ok. Did the same redirect to the second domain before. I have send a message to my service provider about this. Hope they can resolve this.

    Jysse
     

Share This Page