I have just installed NextcloudPi on my Odroid board running on Debian Stretch. Since I’m still a newbie to selfhosting, I used NextcloudPi and it worked like a charm, which is really amazing (I tried to set up a LAMP on my own multiple times but failed miserably).
Anyways, my odroid is reachable from the internet via a subdomain to my own domain (like: “cloud.mydomain.com”). Since I may install other web services on my own cloud, I’d like to move NCP to an URL that looks like this: “cloud.mydomain.com/nextcloud”, so that I can use “cloud.mydomain.com” as a general landing page.
Is it possible to move the whole installation to that path? If so, what do I need to do?
Thanks a lot guys, you are doing amazing work. I love Nextcloud and NextcloudPi!
usually, you need to modify the alias in the apache2 vhost configuration.
exemple:
a vhost called nut
file is usually located under /etc/apache2/sites-enabled/vhost-nut.conf
ScriptAlias /tools/nut /usr/lib/cgi-bin/nut
<Directory /usr/lib/cgi-bin/nut>
Allow from All
AllowOverride None
Options ExecCGI
</Directory>
It will be reach using
url= http(s)://whatever.yours/tools/nut
Modifying ScriptAlias /tools/nut /usr/lib/cgi-bin/nut ----> ScriptAlias /nut /usr/lib/cgi-bin/nut
will change the destination to
url= http(s)://whatever.yours/nut
Apache2 need to be restarted, of course.
Unfortunatly, i dont use NextcloudPi, but it should be very closed to that.
Yeah, I figured it would work something like that. I looked into the sites-enabled and there is one ncp.conf and one nextcloud.conf. I guess I’d have to change both. But then again, the ncp admin panel is showing cloud.mydomain.com as the url. And I really don’t want to break it now that I have it up and running.
Maybe somebody has already done this and knows if this will work?
I’m thinking of rather doing the opposite because of:
If you want to use other services, why not set up other specific subdomains? Make a general www.example.com as your default landing page, and then mail, cloud, …
You are right and I’m working on changing it because I feel like using nextcloud.mydomain.tld is much more elegant anyways.
The problem I was facing back then is that I need to use a DynDNS and my domain provider only allows setting up DynDNS for specific subdomains, not the whole domain.
You can use aother DynDNS provider and CNAME to configure subdomain.
Then you set your sudomains from your provider with CNAME to the dyndns-service.
Problem is the domain because that is an A-record and not a CNAME.
Perhaps you can use a webservice and 301-redirect to a CNAME-subdomain.