Let’s Encrypt with Apache on Ubuntu

Clone the Let’s Encrypt repository sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt Access the letsencrypt directory cd /opt/letsencrypt Auto install all dependencies sudo -i ./letsencrypt-auto Generate certificates for your domains Execute the interactive installation and obtain a certificate for each domain. ./letsencrypt-auto certonly –webroot -w /var/www/faix/wordpress/ -d faix.cz -d www.faix.cz ./letsencrypt-auto certonly –webroot -w /var/www/zviretnik/wordpress/ -d zviretnik.eu … Read more

Gallery 3 installation / upgrade in Ubuntu

Installation aptitude install apache2 mysql-server-5.1 su – www-data cd /var/www/user wget http://downloads.sourceforge.net/gallery/gallery-3.0.4.zip unzip gallery-3.0.4.zip mv gallery3 gallery rm gallery-3.0.4.zip cd gallery mkdir var chmod 777 var exit mysql -u root -p SHOW DATABASES; SELECT User FROM mysql.user; CREATE DATABASE `user-gallery3`; CREATE USER `user-gallery`; SET PASSWORD FOR 'user-gallery' = PASSWORD('mysecretpassword'); GRANT ALL PRIVILEGES ON `user-gallery3`.* TO … Read more

Hosting multiple websites with Apache2

http://www.debian-administration.org/articles/412 http://fob.po8.org/node/289 If you are running multiple websites with Apache2 with mixed ports (usually http port 80, https port 443) change following configuration files. Variable NameVirtualHost should be only in file virtual.conf, find and comment it in other configuration files! FOB: I recently reported being stuck trying to set up multiple SSL name-based virtual hosts … Read more

Apache2 – WordPress & Gallery solutions

If Apache server status page http://zviretnik.eu/server-status error 403 page not found appear, the solution could be modification of .htaccess file of WordPress. Mode rewrite has to have following rule: # Stop Processing if you see server-info or server-status RewriteRule ^(server-info|server-status) – [L] # The Rewrite Condition below did not work # RewriteCond %{REQUEST_URI} !=/server-status Don’t forget, that … Read more

Apache2 security – mod_rewrite, mod_security

Enable mod_rewrite in Apache2 http://www.grosseosterhues.com/2011/07/enabling-mod-security-protection-in-apache2-on-ubuntu/ http://www.linuxlog.org/?p=135 a2enmod rewrite /etc/apache2/sites-available/000-default Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all /etc/init.d/apache2 restart .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Enable mod_evasive and mod_security in Apache2 aptitude install libapache-mod-security libapache2-mod-evasive a2enmod … Read more