So far I did this, enabled ssl by this command a2enmod ssl and inside /etc/apache2/listen.conf added

Listen 80
<IfDefine SSL>
    <IfDefine !NOSSL>
    <IfModule mod_ssl.c>
        Listen 443

Then stopped apache then started and restarted multiple times but no service is running/listening to port 443. How can I make it work?

I am using LinuxOpenSUSE.

  • 2
    you could save all the hassle if you removed all the IfDefine/IfModule orgy tags you have in there. – ezra-s Oct 19 '17 at 8:09
  • I suggest you do another virtualhost that listen on port 443 – Orphans Oct 19 '17 at 9:10

As @ezra-s suggested, removing all those tags did the trick. Now I just have following two lines without the tags and it is working just fine.

Listen 80
Listen 443

To finally enable SSL the server needs to be started with the flag "SSL". To do so, call a2enflag SSL


One more </IfDefine>

is missing in your example. Maybe that has something to do with it.

  • Where do I add this </IfDefine>? Could you show the details – asdfkjasdfjk Oct 18 '17 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.