new vhost, routes wrong

Discussion in 'Installation/Configuration' started by jdc32, Jan 21, 2007.

  1. jdc32

    jdc32 New Member

    hello,

    my standard domain for my server is www1.xxx.com, if i add a site like rc.xxx.com this site added correctly at the vhost file with the correct documentroot.

    if i open the url with my browser, i get the standard index from /var/www/ and not the correct documentroot from the vhost file.

    if i add another site with a diffrent domain like www.xyz.com all works fine.

    my installation (debian 3.1) is a completly new and i have chance nothing at /etc/apache2

    can anybody help me?

    thanks.

    jdc
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Is the domain rc.xxx.com a DNS-A Record that points correctly to your server IP and not a redirect?
     
  3. jdc32

    jdc32 New Member

    yes, my standard ip for www1.xxx.com is xxx.xxx.xxx.212 and the ip for rc.xxx.com is xxx.xxx.xxx.83. the dns entry is correct.

    i get following errors in /var/log/apache2/error.log if i open the rc.xxx.com:

    [Sun Jan 21 13:32:25 2007] [error] [client 212.202.xxx.xxx] File does not exist: /htdocs
    [Sun Jan 21 13:35:19 2007] [error] [client 212.202.xxx.xxx] File does not exist: /htdocs
    [Sun Jan 21 13:35:23 2007] [error] [client 212.202.xxx.xxx] File does not exist: /htdocs

    i dont understand this errors, because the normal ispconfig htmldoc dir is .../web/ and not /htdocs???
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The errors are not from ISPConfig. Where there some other sites configured before you installed ISPConfig?

    Did you select the IP xxx.xxx.xxx.83 in the website settings of the site rc.xxx.com?
     
  5. jdc32

    jdc32 New Member

    no its a clean installation, i use the standard installation steps from ispconfig for debian.

    yes the correct ip is set for the rc.xxx.com domain.
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ifconfig
    and what's in Vhosts_ispconfig.conf?
     
  7. jdc32

    jdc32 New Member

    i think the network config is okay, here the ifconfig output:

    eth0 Link encap:Ethernet HWaddr 00:13:D3:63:81:54
    inet addr:xxx.xxx.18.212 Bcast:xxx.xxx.18.223 Mask:255.255.255.224
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:808843 errors:0 dropped:0 overruns:0 frame:0
    TX packets:647850 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:473965708 (452.0 MiB) TX bytes:178954980 (170.6 MiB)
    Interrupt:169 Base address:0x7000

    eth0:1 Link encap:Ethernet HWaddr 00:13:D3:63:81:54
    inet addr:xxx.xxx.138.82 Bcast:xxx.xxx.138.87 Mask:255.255.255.248
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    Interrupt:169 Base address:0x7000

    eth0:2 Link encap:Ethernet HWaddr 00:13:D3:63:81:54
    inet addr:xxx.xxx.138.83 Bcast:xxx.xxx.138.87 Mask:255.255.255.248
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    Interrupt:169 Base address:0x7000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:115347 errors:0 dropped:0 overruns:0 frame:0
    TX packets:115347 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:30734307 (29.3 MiB) TX bytes:30734307 (29.3 MiB)


    the main ip for the server is eth0 (xxx.xxx.18.212, www1.xxx.com)

    my virtual domains set at eth0:2 (xxx.xxx.138.83, like rc.xxx.com), my domain www.xyz.com is set at the xxx.xxx.138.83 ip too and works fine.

    here my Vhosts_ispconfig.conf file

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost xxx.xxx.138.83:80
    <VirtualHost xxx.xxx.138.83:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: rc.xxx.de:80
    ######################################
    #
    #
    <VirtualHost xxx.xxx.138.83:80>
    ServerName rc.xxx.de:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web9/web
    ServerAlias xxx.de
    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/web9/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/web9/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web9/phptmp/
    php_admin_value session.save_path /var/www/web9/phptmp/
    Alias /error/ "/var/www/web9/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/web9/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web9/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.xyz.de:80
    ######################################
    #
    #
    <VirtualHost xxx.xxx.138.83:80>
    ServerName www.xyz.de:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web7/web
    ServerAlias xyz.de
    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/web7/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 Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web7/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/web7/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web7/user/$1/web/$3
    </VirtualHost>


    here is my sites-enables/000-default from my default site from apache2:

    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    # This directive allows us to have apache2's default start page
    # in /apache2-default/, but still have / go to the right place
    # RedirectMatch ^/$ /apache2-default/
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    </VirtualHost>


    if i open rc.xxx.com in the browser i get the default documentroot /var/www/ and not the correct root from the vhost file.

    :(

    thanks for any help

    jonas
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Is your server behind a router, or is it connected directly to the internet (e.g. in a data centre)?
     
  9. jdc32

    jdc32 New Member

    my ips are public ips and my server hosted by a prof. datacenter.

    the same ip works for my second domain www.xyz.com.
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Does
    Code:
    dig rc.xxx.com
    show the correct IP address?
     
  11. jdc32

    jdc32 New Member

    also das problem ist gelöst. weshalb? keine ahnung.

    habe wegen einer anderen sache ein apt-get upgrade gemacht und er hat meinen apache gepached,... danach gings.

    danke trotzdem für eure hilfe!!!!
     
  12. martinfst

    martinfst Member Moderator

    Please keep using good old English for posts on this forum, even if it's not your native language. That way everyone can read your suggestions.
     

Share This Page