How to: Apache virtual host ssl configuration

Just thought of quickly putting this code on how to setup Apache virtual host ssl as when I initially setuped SSL certificate, it took me a while to setup. Hope this will help some one like me to quickly configure ssl on apache.

  #SSL works on port 443
SSLEngine on   #Start SSL engine
SSLCertificateFile /etc/httpd/ssl/server.crt    #path to your SSL certificate file
SSLCertificateKeyFile /etc/httpd/ssl/server.key #path to you SSL certificate key
 
ServerName example.com  #Your server name
ServerAlias example.com   #Your server name
 
DocumentRoot /var/www/example    #path to your website root folder
 
AllowOverride All
Options All
Order deny,allow
Allow from all

Once this is setupped correctly you will be able to use your URL by adding https in the beginning.

Note: You will need mod_ssl enabled in your PHP configuration

Leave your comments below if you need further help for apache virtual host ssl configuration and I will reply.

8 Comments

  1. Posted November 26, 2010 at 4:22 pm | Permalink

    Love your site man keep up the good work

  2. Posted February 4, 2011 at 5:00 pm | Permalink

    Hi, i just needed to come here to show you about a seriously cheap service that posts comments such as this on millions of Wordpress blogs. Just why you may ask, well you may want to sell a product and target webmasters or merely just improve the amount of backlinks your website has which will increase your Google rankins which will then bring your website much more traffic and cash. Take a fast take a look at this website for much more information. http://hellomotow.net/backlinks

  3. Posted February 5, 2011 at 4:26 am | Permalink

    i like it Cheap Ecommerce Websites | with child combination Development » Blog Archive » to what extent to: Apache essential host ssl configuration very lately im your rss reader

  4. Posted February 5, 2011 at 4:23 pm | Permalink

    Hi, I left you a DOFOLLOW backlink on my website. This isnt a spam message, i actually did leave you a backlink on my site. If you check the top of the page you will see “Sites we like” and there will be a link to this site. Would you be kind enough to leave me a backlink? If so my website is http://crush-the-castle.com please use the anchor text “Crush The Castle” for the link and add it to a post or as a widget. Then please send me a email at backlink@crush-the-castle.com – If you want me to change your links anchor text let me know. Thanks

  5. Posted February 12, 2011 at 6:48 am | Permalink

    i like it Cheap Ecommerce Websites | distended Web exhibition » Blog Archive » for what reason to: Apache virtual host ssl configuration now im your rss reader

  6. Posted February 14, 2011 at 11:43 am | Permalink

    There are some attention-grabbing time limits on this article however I don’t know if I see all of them middle to heart. There is some validity however I’ll take maintain opinion till I look into it further. Good article , thanks and we wish more! Added to FeedBurner as effectively

  7. Posted February 14, 2011 at 7:00 pm | Permalink

    Unquestionably believe that which you said. Your favorite justification seemed to be on the web the simplest thing to be aware of. I say to you, I certainly get annoyed while people think about worries that they just don’t know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will likely be back to get more. Thanks

  8. This actually answered my downside, thanks!