(Dec 29) New version 0.9.8-18 has been released

[Solved] Use the IncludeOptional for redefine the DocumentRoot

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Forum rules
Before creating a new topic or reply on the forum you should fill out additional fields "Os" and "Web" in your profile section.
In case of violation, the topic can be closed or response from the support will not be received.
floown
Posts: 75
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: 75
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: creulcat and 3 guests

cron