vhosts not working correctly

Discussion in 'Installation/Configuration' started by heyp, Nov 29, 2005.

  1. heyp

    heyp New Member

    Hi (not a good day today :D )

    i've created two sites, both have the same IP. When i connect to them i can't access folders, if i delete the default index.html nothing change.

    This is my vhosts configuration file:
    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 10.71.0.3:80
    <VirtualHost 10.71.0.3:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.wienerbergcity.at:80
    ######################################
    #
    #
    <VirtualHost 10.71.0.3:80>
    ServerName www.wienerbergcity.at:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web3/web
    ServerAlias wienerbergcity.at
    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 test.txt
    ScriptAlias  /cgi-bin/ /var/www/web3/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web3/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
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web3/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web3/phptmp/
    php_admin_value session.save_path /var/www/web3/phptmp/
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web3/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/web3/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web3/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.heyp.net:80
    ######################################
    #
    #
    <VirtualHost 10.71.0.3:80>
    ServerName www.heyp.net:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web4/web
    ServerAlias heyp.net
    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
    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/web4/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web4/phptmp/
    php_admin_value session.save_path /var/www/web4/phptmp/
    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>
    #
    
    IMHO it points to the wrong web dir?

    Thx again for your support! :)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Your vhost config is correct.

    Is your DNS setup correct? Maybe you are just accessing the sharedIP website.
     
  3. falko

    falko Super Moderator ISPConfig Developer

  4. heyp

    heyp New Member

    falko: it points to the old IP, currently i'm running with a local IP address and a modified HOSTS file on my client so i can use my domains as tests.

    till: how can i verify that? When i connect to my website webspace with ftp i see a web directory. I think that the path is wrong. When i check the /var/www/web3 dir i see another web which doesn't hold the files that i upload through ftp (for example error and index.html)
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    OK, then you simply uploaded your files to the wrong directory. If you connect with FTP, you must chnage to the "web" directory before you upload your files!. the FTP root is not the website root!
     
  6. heyp

    heyp New Member

    Hm, i can only say to me: RTFM

    The user has to be site administrator to access the other folders, otherwise it's just a user with a user dir domain.com/~user.

    Anyway, thx for your support!
     

Share This Page