[Solved] Use the IncludeOptional for redefine the DocumentRoot

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
floown
Posts: 74
Joined: Wed Nov 19, 2014 1:51 pm

[Solved] Use the IncludeOptional for redefine the DocumentRoot

Postby floown » Tue Sep 05, 2017 1:57 pm

Hello,

I try to install a site (a Drupal 8) that the virtualhost necessite to point to a /web subfolder to be public

I have notice in my /home/admin/conf/web/apache2.conf I have this line :

Code: Select all

IncludeOptional /home/admin/conf/web/apache2.mydomain.tld.conf


So I have edit my apache2.mydomain.tld.conf and add these lines :

Code: Select all

DocumentRoot /home/admin/web/mydomain.tld/public_html/web
    <Directory /home/admin/web/mydomain.tld/public_html/web>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir /home/admin/web/mydomain.tld/public_html/web:/home/admin/tmp
    </Directory>

# RAJOUT pour SSL
Redirect permanent / https://www.mydomain.tld


The redirect for SSL work, but the new document root is not redirected.

Sure I have restart Apache2

I have edit apache2.mydomain.tld.conf instead of apache2.conf in case I rebuild the sites in VestaCp… (but I have try to edit apache2.conf and add manually "/web", but it's the same problem

Thanks for your help

//EDIT : it's the "Redirect permanent" for SSL who make the problem… but I don't know to have the both : the document root, and the Redirect for SSL
Last edited by floown on Wed Sep 06, 2017 2:37 pm, edited 1 time in total.

floown
Posts: 74
Joined: Wed Nov 19, 2014 1:51 pm

Re: Use the IncludeOptional for redefine the DocumentRoot

Postby floown » Wed Sep 06, 2017 2:37 pm

Ok, I have to edit (create) the good file with a "s" prefixe pour this domain name. It works now.


Return to “Web Server”



Who is online

Users browsing this forum: No registered users and 8 guests

cron