By baltusf on
Hi , D7 i have installed so that i can go to https://roots.fred-baltus.nl . In that folder i have all the other folders and files needed. Such as sites, themes, modules , etc
Now with d9 i have all in https://fred-baltus.nl/rootsd9/drupal and there are the folders web and vendor. So to access the site i have to enter https://fred-baltus.nl/rootsd9/drupal/web/ . Is it possible that https://fred-baltus.nl/rootsd9 is the main folder of my site? Can i move the core, modules, profiles, sites and themes folder in the rootsd9 folder, with also the files in the web-folder?
Thanks,
Fred
Comments
Suggestion
I suggest you to download zip from here https://www.drupal.org/download and put it into the domain folder.
If you are ok by not using composer for the setup then you can download the zip archive and can use it in any folder, this is the easiest way to achieve what you want.
Thank You
https://drupal.dotsquares.com
Not convinced that is a good idea, but you probably can.
EDIT: To be clear, this applies to OP. There was no suggestion when I wrote this.
Obviously, depends on your infrastructure and what you actually mean to describe.
Drupal itself provides two project templates, drupal/recommended-project and drupal/legacy-project. Both are ready for maintaining code base with Composer. When downloading drupal/core from drupal.org you'll receive a project based on drupal/legacy-project. Which is like the D7 downloads with everything in one folder, without a specific folder (web, html, docroot) for what is available through http(s).
The drupal/recommended-project based distributions do have such a specific folder. That structure is specified in composer.json and can only be manually changed, meaning there is no composer command that converts between implementations.
Not sure what it is you really want, but you seem to go about it the wrong way:
- The filesystem
Drupal projects are best served when you don't nest them in the filesystem. For good organization it is best to have them parallel to each other:
/var/www/fred-baltus.nl/roots
/var/www/fred-baltus.nl/rootsd9
/var/www/fred-baltus.nl/rootsd10
/var/www/fred-baltus.nl/whatever
Serving your projects to the internet is done with DNS. This makes https://fred-baltus.nl point through DocumentRoot /var/www/fred-baltus.nl. As there is nothing to serve, it probably needs an .htaccess to default to D7 project. Turning the url into https://fred-baltus.nl/roots.
Obviously you could have DNS point https://roots.fred-baltus.nl to /var/www/fred-baltus.nl/roots. For D9 you would have DNS point https://rootsd9.fred-baltus.nl to /var/www/fred-baltus.nl/rootsd9/web for recommended setup. Without the /web for legacy setup.
When you insist on using https://fred-baltus.nl/rootsd9 you need DNS to point https://fred-baltus.nl to /var/www/fred-baltus.nl, have an alias for rootsd9 pointing to /var/www/fred-baltus.nl/rootsd9/web, adjust the .htaccess to RewriteBase /rootsd9 for recommended setup. The alternative is to convert recommended to legacy setup. Moving the folders one up is just part of the conversion, not the way I would recommend doing.
To avoid problems I would go for subdomains pointing DocumentRoot to appropriate folder in filesystem and provide one of the subdomains as default for domain.
Thanks for the answers ...
Thanks for the answers ...
I had to look how i did 13 years ago . I made then a domain roots.fred-baltus.nl and the document root is /public_html/roots. So if i'm correct i can make in in public_html a folder rootsd9 and put the the folder drupal and all the other folders and files in it. .Besides that i can make a new domain /public_html/rootsd9/drupal/web and call the domain for testing rootsd9.fred-baltus.nl. Is that correct?
I did the above, but when i go to https://rootsd9.fred-baltus.nl/ and i click on a menu item is see e.g. https://rootsd9.fred-baltus.nl/rootsd9/drupal/web/berichten. How can i solve that? ...... I see it's a problem when i click in the menu's on the left? A caching problem?
I cleared the cache... now it works fine. The only thing to do now is getting IMCE getting to work fine... see my other problem ;)
Thanks,
Fred
Good to see you went for that solution
You might want to keep the subdomain to yourself and switch DocumentRoot of roots.fred-baltus.nl to /public_html/rootsd9/drupal/web when you migrated to D9.
Surprised to hear about the cache issue, didn't expect that. Despite cache being a common cause of things going wrong.
Sorry, can't be of help with IMCE, good luck with that. Looks like you commented on a doc, suggest to post in the forum or issue queue instead.