Setting DocumentRoot for apache

Discussion in 'Installation/Configuration' started by DrMartinus, Aug 25, 2021.

  1. DrMartinus

    DrMartinus Member HowtoForge Supporter

    Hi,
    in order to install Contao, I want to set a different DocumentRoot for one website. So I went to ISPC/Sites/Options and entered in "Apache Directives" the line
    Code:
    DocumentRoot "/var/www/clients/client1/web8/web/"
    I restarted httpd, but the Contao-Manager still says:
    Code:
    The Contao Manager could not create the directory "/var/www/clients/client1/web8/contao-manager"
    I checked in ISP/sites/Domain, there it says:
    Code:
    Document Root:     /var/www/clients/client1/web8
    
    I checked in /etc/httpd/conf/sites-enabled/domain.vhost, there it says:
    Code:
    DocumentRoot "/var/www/clients/client1/web8/web/"
    Obviously, the apache directive doesn't have an impact, even though it is reflected in the conf-file.
    What did I miss?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Contao tries to create a folder in a directory where it is not allowed to create a folder, that's why this fails. The 'web' directory is already the webroot directory, so no need to set it again via DocumentRoot directive. If a CMS persists on creating its own directory below the document root, then you must set the docroot to a folder that inside the web dir. Example:

    DocumentRoot "/var/www/clients/client1/web8/web/contao/"

    so that contao then can create its folder 'contao-manager' as /var/www/clients/client1/web8/web/contao-manager
     

Share This Page