How do I allow https through modsecurity?

Posted on 2014-08-14
Last Modified: 2014-08-17
Hi all,

I installed ISPConfig 3 and then got a StartSSL free certificate for it.
It works fine on port 8080 in https mode and the SSL certificate is recognized.
I access it using:

Before I installed the SSL certificate I had a self-signed certificate which allowed ISP Config to work as above (there used to be a red line diagonally across the word "https" before because the certificate was not related to that domain) but also my domain to load as:

But since I installed the StartSSL certificate, I can only access the ISPConfig but not my normal site anymore.
I believe that sine the self-signed certificate was made out to my FQDN it did not cause any conflicts but now that the new Startssl certificate is made out to it is causing all this.
Now when I access my domain I get this error: Forbidden. You don't have permission to access / on this server.

The culprit behind it all is modsecurity which has the SecRuleEngine On. If I turn that Off everything works fine, but with it on I don't really know how to make the right modifications in the apache.conf, my virtualhost's conf file or any other file that I do not know about.

What should I do? I need the two things to work, with mod-security turned on, as before: -> ISPConfig (working, the https does not have any red line striking through anymore) -> my website (at present not working)

I temporarily tried turning the SecRuleEngine to Off and everything started working again, but that was a scenario which I would not like to keep. I need mod_security to be on and the sites to work at the same time.

thanks in advance
Question by:badwolfff
    LVL 10

    Accepted Solution

    Hi badwolff,

    Could you please post the Apache error and access logs. Do this by:
    0. Stop httpd.
    1. moving the old logs,
    2. configure the logging at INFO level,
    3. start httpd,
    4. make a request on the erroneous URL.
    5. Post the logging results contained in the access and errorlog here.

    rgrds, Chris

    Author Comment

    Thanks Chris, all sorted. All it needed was a reboot of the system for the new rules I had written to activate. Sorry for the trouble. If I get stuck again I will write back.

    And since you are the only one who took the trouble to reply, the points are yours.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
    You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now