Move ownCloud from /var/www/owncloud to /var/www/html/owncloud?

Hey all – new ownCloud installer on Ubuntu Linux 18.04 here.

OwnCloud installed by default to /var/www/owncloud. However, I want it to run at my localhost/owncloud… but all my localhost sites and folders are at /var/www/html/.

How can I cleanly move my ownCloud install without breaking anything?

Please consider me a Linux newbie+ – I can work my way around the terminal and I follow directions pretty well…

Thanks in advance!

Matt

@mattselz
by default it’s accessible with http://server_IP/owncloud even when on disk ownCloud is located in /var/www/owncloud.
In /etc/apache2/sites-available, there should be a file owncloud.conf
In /etc/apache2/sites-enable, there should be a symbolic link to the above file.

owncloud.conf from /etc/apache2/sites-available
will contain an Alias /owncloud /var/www/owncloud which tells apache2 service where to look for when you are trying to connect on http://server_ip/owncloud or http://localhost/owncloud (last only from the server available where owncloud is directly installed)

if you want to access your owncloud server you should modify /var/www/owncloud/config/config.php in trusted_domains section and add localhost.

localhost will have IP: 127.0.0.1 which mean you can only access it from that server only.

And… you should not move your ownCloud as the DB is already configured with that location.

1 Like

Hey,

additionally to this if linux packages are used it probably would also break further updates.