Change DocumentRoot in /etc/apache2/vhosts/Vhost_ispconfig.conf

Discussion in 'Installation/Configuration' started by vclarine, Oct 5, 2011.

  1. vclarine

    vclarine New Member

    My system is Linux Debian 5, Ispconfig 2, Apache, mysql, php.

    I want to change the DocumentRoot for mysite2.tld in /etc/apache2/vhosts/Vhost_ispconfig.conf;
    i know that there is no need to modify this directly in the file /etc/apache2/vhosts/Vhost_ispconfig.conf and i have to do this in Ispconfig interface.

    On my Ispconfig 2 interface i add Apache Directives for my domaine mysite2.tld because i want mysite2.tld to use the new directory /home/var/www/web78/web instead of
    /home/var/www/web200/web

    <Directory "/home/var/www/web78/web/">
    Options FollowSymLinks
    AllowOverride All
    </Directory>

    DocumentRoot /home/var/www/web78/web


    And this is ok because the Vhost_ispconfig.conf is normaly updated but the new DocumentRoot /home/var/www/web78/web is added at the bigining of the file and before the old DocumentRoot
    so that it is not working at all.

    In Apache without Ispconfig this work normaly why not with Ispconfig ?
    Help me please !
    Thanks.


    Here is part of my virtual host of the site mysite.tld

    ######################################
    # Vhost: www.mysite2.tld:80
    ######################################
    #
    #
    <VirtualHost 192.168.xx.xx:80>

    <Directory "/home/var/www/web78/web/">
    Options FollowSymLinks
    AllowOverride All
    </Directory>

    DocumentRoot /home/var/www/web78/web

    ServerName www.mysite2.tld:80
    ServerAdmin [email protected]
    DocumentRoot /home/var/www/web200/web
    ServerAlias mysite2.tld
    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
    Alias /cgi-bin/ /home/var/www/web200/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /home/var/www/web200/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/home/var/www/web200/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 ^/~([^/]+)(/(.*))? /home/var/www/web200/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /home/var/www/web200/user/$1/web/$3
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You've given the answer already:

     

Share This Page