Magento: configure https with Apache SSL for secure pages

Have these configuration in /etc/apache2/extra/httpd-vhosts.conf, change the value for DocumentRoot, ServeName and Directory to yours. Make sure you configured SSL in your apache, if not following this guide.
[code language=”shell”]
<VirtualHost 127.0.0.1:80>
DocumentRoot /Users/mike/dev/mage_cm
ServerName mage-cm.com
<Directory "/Users/mike/dev/mage_cm">
Options +MultiViews +FollowSymLinks +Indexes
AllowOverride ALL
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1:443>
ServerName mage-cm.com
DocumentRoot /Users/mike/dev/mage_cm/
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
<Directory /Users/mike/dev/mage_cm>
Options Indexes FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
</Directory>
</VirtualHost>
[/code]

Make sure you have these two lines in /etc/apache2/httpd.conf, these can only be defined once.
[code language=”shell”]
Listen 80
Listen 443
[/code]

Have this line in your /etc/hosts file to point to your ServerName.
[code language=”shell”]
127.0.0.1 mage_cm.com
[/code]

Restart Apache
[code language=”shell”]
sudo /usr/sbin/apachectl restart
[/code]

Login to Magento admin -> Configuration -> Click Web on the left menu -> Click Secure tab -> Select Yes for Use Secure URLs in Frontend and Use Secure URLs in Admin -> Save

Now, if you login as a customer in the frontend or login to admin panel, it will use the https instead of http.

Search within Codexpedia

Custom Search

Search the entire web

Custom Search