Friday, 18 April 2014

Your very own cloud server

If you've followed the instructions I've written for setting up your own newsgroup indexer, then setting up a cloud server is really very simple.

Get a terminal opened up on the server and su to root, and then type in the following:

mkdir /var/www/cloud
mkdir /var/www/cloud/www
chmod -R -v 0777 /var/www/cloud

Then we need to create the config file:

nano /etc/apache2/sites-available/cloud

Paste the following into the empty file:

<VirtualHost *:8081>
ServerAdmin webmaster@localhost
ServerName localhost

DocumentRoot /var/www/cloud/www
ErrorLog /var/log/apache2/error.log
LogLevel warn
</VirtualHost>

You don't have to use port 8081 but I've decided to for no particular reason.

Save the file and then we need to get the server to listen to the relevant port by editing the ports.conf file with:

nano /etc/apache2/ports.conf

Add a line with:

Listen 8081

Save the file and then run the following:


a2ensite cloud
a2enmod rewrite
service apache2 restart

Then we need to change to the folder for the cloud server with:

cd /var/www/cloud/www

And then run:

wget https://download.owncloud.com/download/community/setup-owncloud.php

Nowe we can configure the server by running

http://servername:8081/setup-owncloud.php

Just follow the instructions, it's really that easy,