Nate's Programming Blog

This will be my first post on I wanted to wait until I had everything setup before I started posting. I’ve spent the last week off and on trying to get SSL working on the login page for WordPress. It took me almost a whole day to try and figure out how to get mod_ssl installed on apache and get the keystore setup, but that part was done on Saturday. I thought the hardest part was over, but then I tried to setup URL rewriting for the login page so that when you get to the login page it automatically redirects you to port 443 (SSL) and then after you login it goes back to port 80. Well it only took part of the day Sunday to get the URL rewriting working so that the login page would be https and all other pages would be http. The problem was that the lock wasn’t showing up in the bottom corner signifying that the page was secure. After hours of debugging I finally came to the conclusion that it was the images being referenced in the stylesheet that were causing the lock to disappear. Since then I’ve spent days researching solutions via Apache and PHP to solve this problem. Even though the images were relative paths, they were still going over port 80, thus preventing the lock from appearing. Finally this evening I found the solution. Basically I have 2 Apache config files, the first is the httpd standard config file and it has the rewrite for the login page on the virtual host for and Then there is the ssl config file that has virtual hosts setup for port 443 the SSL port and it basically redirects back to port 80 if the requested page is not the login page. Well the problem was that the images were not /wp-login.php therefore they were getting redirected back to port 80 when the browser requested those images, thus causing the lock to disappear. By adding the images that are on the login page to the SSL virtual hosts it then allowed those images to go over SSL and the lock reappeared. It depresses me to think of how many days and hours I’ve spent on this, but I’m glad it is working now.

Name (required)

Email (required)


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Feel free to leave a comment