ISPConfig 3 - Vhost and DocumentRoot

Discussion in 'Developers' Forum' started by Mouton, Mar 5, 2009.

  1. Mouton

    Mouton New Member

    Hello,

    I changed the default configuration for documentroot folder from /var/www/... to /home/www/... but not all the paths in the vhost files are changed. Could this be a bug ? Am I doing something wrong ?

    Config: Debian Lenny / Ispconfig 3.0.0.9 RC2



    Here is the vhost file:



    Code:
    <VirtualHost *:80>
          DocumentRoot [COLOR="Red"]/var/www/[/COLOR]domain.tld/web
    
        ServerName domain.tld
        ServerAlias www.domain.tld
        ServerAdmin [email protected]
    
        ErrorLog /var/log/ispconfig/httpd/domain.tld/error.log
    
        ErrorDocument 400 /error/400.html
        ErrorDocument 401 /error/401.html
        ErrorDocument 403 /error/403.html
        ErrorDocument 404 /error/404.html
        ErrorDocument 405 /error/405.html
        ErrorDocument 500 /error/500.html
        ErrorDocument 503 /error/503.html
    
        <Directory [COLOR="Red"]/var/www/[/COLOR]domain.tld/web>
            Options FollowSymLinks
            AllowOverride Indexes AuthConfig Limit FileInfo
            Order allow,deny
            Allow from all
        </Directory>
    
        # mod_php enabled
        AddType application/x-httpd-php .php .php3 .php4 .php5
            php_admin_value sendmail_path "/usr/sbin/sendmail -t -i [email protected]"
        php_admin_value upload_tmp_dir [COLOR="Red"]/home/www/[/COLOR]web2/tmp
        php_admin_value session.save_path [COLOR="Red"]/home/www/[/COLOR]web2/tmp
        #php_admin_value open_basedir [COLOR="Red"]/home/www/[/COLOR]web2:/usr/share/php5
    
    
    </VirtualHost>
    

    And of course, restarting apache leads to
    Code:
    /home/www# /etc/init.d/apache2 restart
    Restarting web server: apache2Warning: DocumentRoot [/var/www/domain.tld/web] does not exist
     ... waiting Warning: DocumentRoot [/var/www/domain.tld/web] does not exist
    .
    
     
    Last edited: Mar 5, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you change the path to /home/www several functions like suexec will not work anymore because the suexec path /var/www is compiled into the apache binaries from debian. If you dont need functions like suexec and can live with a limited functionality in ISPConfig, you can use /home/www but you might have to change also the vhost templete in /usr/local/ispconfig/server/conf/
     
  3. Mouton

    Mouton New Member

    It's ok for me to have ISPConfig to be placed into/var/www, but not for domains handled in ISPConfig.

    It's strange that we can redefine the "Website path" param in the system-> server config in ISPConfig interface but that it doesn't work anymore after changing this. ?

    The thing is my main drive is mounted in /home/. Cannot I use this space for websites without reviewing all my server config ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can do this if you do what I explained above.
     

Share This Page