Different Apache confs for SSL/non-SSL

  • Hello !

    Is it possible, that the SSL and non-SSL Apache configurations get an other include for individual configs ?


    thanx !

  • Hmmm, I think easiest way to do this is:
    * symlink domain.tld_ssl.conf to domain.tld.conf
    * Add a comment to domain.tld.conf that the admin can delete domain.tld_ssl.conf and add his own custom config for ssl virtual host
    * add into the ssl template the new include path

    I'm not the best in perl... but here are all files where it should be edited:

    Here we have to add and/or delete the symlinks (I think somewhere with the variable APACHE_CUSTOM_SITES_CONFIG_DIR):

    Comment must be added here:
    Example: "For custom SSL VirtualHost config delete symlink domain.tld_ssl.conf and create a new file with the same name"

    And here:
    on Line 161:
    would be:


    Edited once, last by fluser ().

  • Can you open a ticket? I've got a better solution for it:

    Three different custom apache2 files:
    --> What SSL and no SSL Sites should have configured (for example mod rewrite or proxy)

    --> With an include of domain.tld_combined.conf
    >> Can have custom only for no SSL configuration

    --> With an include of domain.tld_combined.conf
    >> Can have custom only for SSL configuration

    Symlink was a bad idea because you would need to enforce custom config in both, non ssl and ssl custom config file. with an include of a combined file, it could be something like that:

    In non-SSL custom file: rewrite a special url to https
    In SSL custom file: proxy redirect of special url to another page or glassfish/tomcat server or redmine
    In combined custom file: rewrite url's from index.php?xyz to info.html or something like that.

    I don't have a lot of time at the moment. But I'm looking forward to implement it on my dev server soon.