Closed mferraro closed 7 years ago
You shoukd define env vars PHP_DOCROOT
and NGINX_DOCROOT
. Something like that:
php:
environment:
PHP_DOCROOT: drupal
nginx:
environment:
NGINX_DOCROOT: drupal
Hi Pavel, i think is not same what you explain me and what i need.
The PHP_DOCROOT and NGINX_DOCROOT define the root of the project but I need to install the Drupal inside another subfolder. An example of url is: domain.com/subdirectory/index.php
with PHP_DOCROOT AND NGINX_DOCROOT the url is always the same domain.com/index.php
Yes, you're right. What if you define only PHP_DOCROOT: subdirectory
?
Try to define PHP_DOCROOT and remove NGINX_DOCROOT definition.
My directory structure is:
On docker-compose.yml the configuration is: PHP_DOCROOT: project NGINX_DOCROOT: project
I have the same situation as mferraro, I would like to have my drupal running in a subfolder.
Tried included the PHP_DOCROOT: subdir and NGINX_DOCROOT: subdir -> failed (File not found)
Tried included the PHP_DOCROOT:subdir and remove NGINX_DOCROOT:subdir -> failed (still run in root folder)
@devilmic Try the other possible option: Tried included the NGINX_DOCROOT:subdir and remove PHP_DOCROOT:subdir That work for me.
The NGINX_DOCROOT must be the root and the Drupal installation on a subdirectory. With this configuration you can't access on drupal with an url like this: http://dominio.com/subdir/
@mferraro In the configuration that you propose what do you will see when you access to the http://dominio.com ?
El 23 dic. 2016 2:59 p. m., "Ernesto Rodriguez Ortiz" < notifications@github.com> escribió:
@mferraro https://github.com/mferraro In the configuration that you propose what do you will see when you access to the http://dominio.com ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wodby/drupal-php/issues/16#issuecomment-268993833, or mute the thread https://github.com/notifications/unsubscribe-auth/AC3jH7p4QtPV_Upsm0IKOhic9hBHdaGyks5rK9OtgaJpZM4LAD5f .
erozqba, Tried your method as well but still had negative result. I used 7.x drupal. Which version you are using?
mferraro Tried enable PHP_DOCROOT only, the 'docker-compose up' output the following to terminal when browsing with subdir:
FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 'browser ip', server: localhost, request: "GET /portal/ HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "'hostip':8000"
Sorry guys there is no way to use sub-directory in your site URL. Env vars PHP_DOCROOT
and NGINX_DOCROOT
are about docroot in /var/www/html
but not about sub-directory in URL.
I see it's a point to imporvement d4d. Until it's done you should modify Nginx config manually.
This is a way too specific use-case for us to support
Reading the FAQs and documentation I don't find how install Drupal on a subdirectory
Example: domain.com/drupal/ I need to define a basePath different then "/"