Instructables

Raspberry Pi Owncloud (dropbox clone)

Step 3: Configuor php & Apache

Picture of Configuor php & Apache
Screen Shot 2012-10-27 at 16.18.07.png
Screen Shot 2012-10-27 at 16.18.32.png
Screen Shot 2012-10-27 at 16.18.53.png
Screen Shot 2012-10-27 at 16.19.49.png
Screen Shot 2012-10-27 at 16.20.49.png
Now we have download the software we need to configor it.

First off we need to install PHP apc

$ sudo pecl install apc
 
After that is done we need to create the apc.ini

$ sudo nano /etc/php5/cgi/conf.d/apc.ini

In to that file we need to add the following

extension=apc.so
apc.enabled=1
apc.shm_size=30

Once added the file needs saving

Next up we have to change the PHP.ini to change the max upload file so we can add large file and add the APC externsion to PHP

$ sudo nano /etc/php5/apache2/php.ini

In this file we need to find upload_max_filesize and then change the value to 1024M which will allow files of upto 1GB to be uploaded

The we need to find post_max_size and then chaged the value to 1200m which will allow files to upto 1 gb to be uploaded

We need to find externsion= section and add in the extension=apc.so

After we have done that save and exit

next up we need to config apache and enable SSL

$ sudo nano /etc/apache2/sites-enabled/000-default

inside the file we need to change Allow over ride to All from none 

Next up we need to setup SSL

$ sudo a2enmod rewrite
$ sudo a2enmod headers


After the follow command you will be asked to provide information

sudo openssl genrsa -des3 -out server.key 1024; sudo openssl rsa -in server.key -out server.key.insecure;sudo openssl req -new -key server.key -out server.csr;sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt;sudo cp server.crt /etc/ssl/certs;sudo cp server.key /etc/ssl/private;sudo a2enmod ssl;sudo a2ensite default-ssl

Once all that is done the apache need restarting

$ sudo service apache2 restart
 
Remove these adsRemove these ads by Signing Up
javl11 months ago
It would be nice if you could explain some things a bit more, like:

"In to that file we need to add the following
extension=apc.so
apc.enabled=1
apc.shm_size=30"

What are these values? It is always good to know what it is you're doing, instead of just following the steps blindly.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!