What I’m trying to do: Install WordPress & NextCloud to different drive (not directory)
Where I’m stuck: Understanding NGinx basics and how to…
What I’ve already tried: Regular installation
Hello and kind regards.
First of all I would like to annotate that I am not a native speaker, so please excuse any strange expression. Thanks in advance.
Many years ago I fiddled around with Apache but I changed to NGinx in order to use it on my Raspberry Pi for some light WordPress development and private cloud services with NextCloud. I am a Mac user since years, never been into console too deep so Linux commands and else are somewhat familiar but not very well known to me.
Right now NGinx is running on my Raspberry Pi in non-Docker installation providing a WordPress site off the standard Bookworm Linux OS on the main drive of the Pi. The main drive is one of 4 SSDs. What I want to achieve (and where I get stuck sooner or later…): I want to keep the NGinx server on the main (boot) drive but the WordPress installation onto the second SSD and the NextCloud installation on the third SSD (note: NextCloud is NOT installed by now).
What I understood by now (please correct if I am wrong somewhere): NGinx handles sites / domains via the “sites-available” directory configured via nginx.conf while the site (WordPress or else) is located in the regular /var/www/html directory.
Now, what I want to achieve is NGinx handling the WordPress installation from a different drive (second SSD) on top level, so to say “/” of that second SSD, the same with NextCloud configured as subdomain to NGinx on the top level “/” of the third SSD. NextCloud will make use of it’s own MariaDB database, of course (if I`m getting all this to work somehow).
I do not really understand the dependencies of nginx.conf and the “sites-available” / “sites-enabled” or where to edit what file to achieve what I am planning. As far as I understood NGinx by now it should be possible to sym-link any domain or subdomain to the “sites-enabled” directory but I do not get the connection to the physical installation location and that “sites-enabled” directory.
I know how to edit via console / SSH in general but I really could need some help in this as I am more of the lazy design Mac user type than the code editor (but I try to learn, I like to understand things!). Please have in mind I am not the youngest one anymore (late 50s…), it takes some time for me to understand complex things like NGinx (I am much better at WordPress…).
Thanks for any helpful hint in advance!
Jens