Drupal in sub directory, still not clear 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/ to 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 vendor.

So, the concluding question is, would you recommend simply renaming web to myproject, or should I do it another way?

EDIT: a symlink from myproject to 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.
Apache can handle this. You can leave the Drupal code where it is.

Have a look at the Apache documentation for Mapping URLs to Filesystem Locations. In particular, the differences between DocumentRoot and Alias.

In the absence of any other information, Apache looks for files/scripts in the document root. For a Drupal site located at https://www.myorganization.it/, it's enough to point DocumentRoot at the web directory. Apache will find index.php there.

But myproject isn't a directory in the filesystem. So you need to explicitly tell Apache about it, that any URL starting /myproject refers to the web directory. You can do that with the Alias directive:

Alias "/myproject" "/var/www/MY_ORGANIZATION/MY_PROJECT/current/web"

You'll also want to point DocumentRoot somewhere else to stop Drupal being visible at the root too (an empty directory will do).