Moving NCP from cloud.mydomain.com to cloud.mydomain.com/nextcloud

Hi there,

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.

Hey there, thanks for the reply.

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, …