0

I installed Magento 2 into the root directory but Magento 2 has an own root folder named "rootdirectory/pub" - it works.

But now I want to install Drupal 8 and extract in the "rootdirectory" and want to show this on Domain as subdirectory "blog" e. g. domain.tld/blog additional to Magento 2.

Magento root is configured as

root /var/www/vhosts/domain.tld/httpdocs/pub

Drupal I have placed in /var/www/vhosts/domain.tld/httpdocs/drupal

I could copy it into the Magento 2 pub directory but I think it is better to place it outside of the pub subfolder of Magento 2.

Maybe rewrite /drupal on Domain to /blog and make it reachable? Or I make the httpdocs/ as nginx vhost root and for Magento I give the /pub folder the root in a location.

Anyone has an idea?

Pierre.Vriens
  • 1,159
  • 34
  • 15
  • 19
Alexander
  • 1
  • 3

2 Answers2

1

As you say, the easiest way is to just put it it in the blog folder of the existing directory, but there may be complications if you need to tweak things. The other better way is to define another location block inside your server with a separate root inside the location block.

Tim
  • 31,888
  • 7
  • 52
  • 78
0

Subdomain isn't an option here? Then it could go like this:

  • Keep original website here: /var/www/vhosts/domain.tld/

  • Put Drupal site here: /var/www/vhosts/drupal.domain.tld/

Create a new NginX configuration file so I would have 2 links in sites enabled:

  • /etc/nginx/sites-available/domain.tld.conf
  • /etc/nginx/sites-available/drupal.domain.tld.conf

Have the original domain.tld.conf point to your Magento 2 as it is now. But in the newly created drupal.domain.tld.conf I would just create the very same scheme but with URL drupal.domain.tld

OFC if subdomain is not an option, then still, put the folders where I've said, but just create a new location in your original conf file for domain.tld/drupal or whatever you want the drupal be available at. and point it with a root and index option to the correct place in a location option.

Bert
  • 1,028
  • 1
  • 16
  • 33