(co-)domain showing /var/www/ filelist instead of website

Discussion in 'Installation/Configuration' started by locosoft, Jun 7, 2006.

  1. locosoft

    locosoft New Member

    Hello,

    On our server here ISPconfig has been installed.
    The server is running ubuntu 5.10, apache 2 and php5.
    An installation document (Ubuntu + ISPconfig Installation.doc) was used to install ISPconfig but I don't know if it was followed to the letter.

    After a lot of trouble we have ISPconfig working on the server.
    There is however still a problem.

    We have 2 webservers here, one running windows and the new Ubuntu server. We also have another Ubuntu-server that does DNS using ISPconfig.

    The windows-server already hosts domain.com (example ofcoure :) ).
    The Ubuntu server now has to host a sub domain, sub.domain.com

    To make this possible I have created (in ISPconfig) the site domain.com on the Ubuntu server and then created a co-main sub.domain.com.

    Now when I go to http://sub.domain.com I get the listing of /var/www instead of the index.html file in /var/www/web4/web.

    I looked in /etc/apache2/vhosts/Vhosts_ispconfig.conf and it looks correct:
    Code:
    ######################################
    # Vhost: www.domain.com:80
    ######################################
    #
    #
    <VirtualHost 195.35.141.73:80>
    ServerName www.domain.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web4/web
    ServerAlias sub.domain.com domain.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/web4/log/error.log
    Alias /error/ "/var/www/web4/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/web4/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    </VirtualHost>
    
    What is going wrong and how can I fix this?

    Greetz.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ifconfig
    ?
     
  3. locosoft

    locosoft New Member

    ifconfig:
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:00:E2:1A:27:3D
              inet addr:192.168.1.73  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::200:e2ff:fe1a:273d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:102038 errors:0 dropped:0 overruns:0 frame:0
              TX packets:57523 errors:54433 dropped:0 overruns:0 carrier:54433
              collisions:0 txqueuelen:1000
              RX bytes:32590952 (31.0 MiB)  TX bytes:15194247 (14.4 MiB)
    
    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:1765 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1765 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:251707 (245.8 KiB)  TX bytes:251707 (245.8 KiB)
    
    The internal ip 192.168.1.73 but the external ip is 195.35.141.73.
    The translation is handeld by the firewal.

    Greetz.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You have assigned the wrong IP to the website.

    You must use always the internal IP, if you are in a NAT enviroment for a website. In your case 192.168.1.73 and not 195.35.141.73.
     
  5. locosoft

    locosoft New Member

    That works, thanks!

    /me feel so stupid.
     

Share This Page