HOWTO : Make your Apache to use SSL

Step 1 :

sudo a2enmod ssl

Copy the default-ssl to the name as your current XOOPS domain, e.g. samiux.com.

sudo cp /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/samiux.com-ssl

sudo nano /etc/apache2/sites-available/samiux.com-ssl

Do not change anything inside but except the following :

DocumentRoot /var/www/xoops
ServerName http://www.samiux.com # add this line under DocumentRoot
<Directory /var/www/xoops>

Step 2 :

sudo nano /etc/apache2/sites-available/samiux.com

Make sure you enabled rewrite module as at previous HOWTO. Add the following inside the mod_rewrite.c bracket.

RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]

Step 3 :

Open your browser and go to your site and login as admin. Enable SSL and add the SSL URL as https://www.samiux.com at the Preferance.

sudo nano /var/www/xoops/mainfile.php

Change your domain name and path as https://www.samiux.com

Step 4 :

sudo a2ensite samiux.com-ssl

sudo /etc/init.d/apache2 restart

Advertisements

One Response

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: