Question

How to move owncloud from www.mysite.com to www.mysite.com/owncloud

Posted March 9, 2016 2.9k views
Ubuntu Apache One-Click Install Apps

Hi,

I fired up an ubuntu 14.04 owncloud droplet and, after playing around for a while, I’d like to move owncloud from being the default landing of my site. eg: I’d like:

www.mysite.com/owncloud

My apache knowledge is weak and while this seems very simple I’ve so far been unable to achieve much beyond breaking things.

I’ve also tried a couple of how-to’s and walkthroughs I found in other forums but none seemed to help with the default DigitalOcean owncloud droplet setup.

I was hoping that someone had already done this. I’d be more than happy to post contents of files if needed.

Thanks for any help anyone can provide.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

Usually all you have to do is create a new folder/directory named “OwnCloud” and go to your domain.com/owncloud and that should work

Hi,

On Debian, Ubuntu, and their derivatives, Apache installs with a useful configuration so all you have to do is create a /etc/apache2/sites-available/owncloud.conf file with these lines in it, replacing the Directory and other filepaths with your own filepaths:

Alias / "/var/www/owncloud/"

<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

 SetEnv HOME /var/www/owncloud
 SetEnv HTTP_HOME /var/www/owncloud

</Directory>

Then create a symlink to /etc/apache2/sites-enabled:

ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf

Then restart apache

service apache2 restart

Then ownCloud is accessible via the domain yourdomain.com

Submit an Answer