How to setup ownCloud 5 on Ubuntu Server 12.04

Installing Prerequisites For ownCloud We need to install additional libraries that will be used by ownCloud. Execute the following: sudo apt-get install php5-gd php-xml-parser php5-intl smbclient curl libcurl3 php5-curl Now we need to enable mod_rewrite and mod_headers Apache2 modules, that are needed for ownCloud to function normally. To enable mod_rewrite…

Continue reading

Harden Apache on Ubuntu 18.04

To harden your Apache and Ubuntu installation, I would recommend the following steps are taken: Step 1) To avoid HTTP DoS, DDoS or Brute Force attack, you should install this module sudo apt-get install libapache2-mod-evasive sudo a2enmod evasive sudo mkdir /var/log/mod_evasive sudo chown -R www-data:www-data /var/log/mod_evasive Step 2) ModSecurity is…

Continue reading

Error Message: No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration

Today I was trying to import a number of databases into MySQL using the phpmyadmin console, and got this error: No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration After some investigation, I found…

Continue reading

Setup SSL on Apache

You first need to enable to SSL module, this can be done as follows: sudo a2enmod ssl Then restart apache sudo service apache2 restart Create the server encryption keys: cd /etc/apache2 sudo openssl genrsa -out server.key 2048 Use this set of keys to create a certificate request: sudo openssl req…

Continue reading

Setup website authentication on Apache

If you want to setup a basic authentication mechanism on an Apache website you can follow these simple steps. You can create a user using htpasswd: sudo htpasswd -c /etc/apache2/passwords username You can then add the following lines in your Apache site config file (eg /etc/apache2/sites-available/default under the <Directory /> section) AuthType…

Continue reading