My drupal project is in directory
/var/www/MY_ORGANIZATION/MY_PROJECT/current, and apache2 is configured to point the
web subdirectory of the above location. When I access the site, it is of course under http://www.myorganization.it/. Now I need to move it to http://www.myorganization.it/myproject, both for organization policies and to allow it to be more easily reached through a reverse proxy. I searched around and I found a couple of interesting links, like this and this and a few more. Inspired by them, I tried to move the contents of
web/myproject, but when I accessed http://www.myorganization.it/myproject I got blank page. The error in the logs is crystal clear:
Failed opening required '/var/www/MY_ORGANIZATION/MY_PROJECT/current/web/myproject/../vendor/autoload.php'
So I put back the installation in
web/ and renamed it to
myproject, changed apache configuration to point
/var/www/MY_ORGANIZATION/MY_PROJECT/current, and that worked like a charm. But I am not sure this is an advisable configuration, since, well, since all Drupal installations I saw were in a
web directory. Also, from my research I had understood that Drupal installation can be moved to arbitrary subdirectories, but I didn't find any official documentation. It would appear that I should at least configure a path for
So, the concluding question is, would you recommend simply renaming
myproject, or should I do it another way?
EDIT: a symlink from
web seems an elegant solution, it works fine in apache (dev environment), while I'm getting errors with nginx+php-fpm (staging environment); still, it may be the way to go.