Currently have nextcloud installed at example.com/nextcloud does anyone know how to install at cloud.example.com
would be good if you can share the web server used
I recall a longer discussion with a user on GitHub about a similar setup. Maybe you can have a look.
Puhh, ja I remember one case where I instructed a user how to do it and one year later during another web application install he ran into a then expected error and it took quite a while to remember that special setup and fix things. Note that there is not really any reason why a subdomain would be better to split applications compared to sub directories. For security reasons (to marke scraping a little harder), sub directories are actually better and easier to handle regarding HTTPS certificates and webserver-side settings/hardenings in general. Sub domains make sense when you use different physical servers which run different applications for the same domain/organisation, otherwise they will make things more complicated.
There are multiple ways to achieve it, via proxy, via rewrites or by changing the webroot, and the Nextcloud config needs to be altered. It depends hence whether Nextcloud is and will always be the same web application/website on that system or if you plan to add other ones, now or in the future.
Just reviving this thread to get a little insights in the best way to turn a dietpi subfolder installation into a subdomain one (using nginx).
Where would I need to look?
I found this
This works for nextcloud.
But: after I applied the changes, I can no longer open the pihole admin page under internalIP/admin.
Thanks in advance l.
This is correct and expected because you have customised the web server document root and therefore the PiHole admin page can no longer be found.
Can this expected behaviour be resolved by changing the nginx configuration?
Your webroot was
/var/www, inside there was
/nextcloud. Your root is now
/nextcloud, you are not able to reach the “sibling” folders. just revert you changes and you are able to reach it again.
Btw why use a subdomain? It works with a subfolder just fine ootb and the config for subdomain is not so trivial.
You would need to use Nginx Server Blocks (Virtual Hosts) to have different configuration for different domains. Following gives an idea on how it could looks like How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04 | DigitalOcean
Thanks for the pointer @Joulinar
Not too confident knowing my abilities, but I will give it a try.
as stated by @MichaIng above Nextcloud Sub Domain - #3 by MichaIng
There is no real need for setting up a sub domain. It will just complicate thinks compare to sub path.
Ask my wife who asked me to make things consistent for every service hosted at home.
All good, nginx server blocks allowed me to do what I was told to want.
Pihole still accessible, nextcloud and others on a subdomain.