SSL Tip

Discussion in 'Tips/Tricks/Mods' started by nveid, Jan 2, 2012.

  1. nveid

    nveid New Member

    Ever have the annoying issue where when non-SSL domains goto the default SSL website on your server? Really annoying huh?

    Well here's the solution:

    First off you will want to turn off your global listen for 443..

    In debian this will be in /etc/apache2/ports.conf
    In Cent this will be at /etc/httpd/conf.d/ssl.conf

    Okay.. Now that you did that, you will want to listen somewhere for 443!

    To do this requires some editing of your vhost.conf.master, normally the best way to do this is to cp your vhost.conf.master in ispconfig server/conf directory to server/conf-custom

    After you do that make this simple change inside the tmpl_loop="ghosts"
    Add this right underneath that section..
    Code:
    <tmpl_if name='ssl_enabled'>
    Listen {tmpl_var name='ip_address'}:{tmpl_var name='port'}
    </tmpl_if>
    
    Now you could do a if module check to see if SSL is on.. Though most likely if your making this change you do have SSL installed on your server so no need to worry too much about that. Enjoy, I hope this helped someone!
     

Share This Page