How to configure SSL on Apache 2.4 (Windows 7)?

10,717

The fact you are not able to get that file due to permissions rather than due to SSL/TLS errors suggests this is not a HTTPS set up error.

I'd suggest that you need to add this:

Require all granted

to your Directory config for your 443 vhost to allow access to this directory. You have this on your 80 vhost.

Share:
10,717
Cesare
Author by

Cesare

Updated on June 04, 2022

Comments

  • Cesare
    Cesare almost 2 years

    I'm trying to install and configure Apache 2.4 on my pc (Windows 7).

    I need also PHP and SSL.

    All is working fine with http and php, but I've some troubles with https.

    I've search on the web for some tutorials and I've found this one: http://www.silverwareconsulting.com/index.cfm/2009/3/31/Enabling-SSL-on-Apache-on-Windows

    In my httpd-vhosts.conf file I've created two Virtual Host definitions ....

    <VirtualHost *:80>
      ServerAdmin [email protected]
      DocumentRoot "D:/Cesare/Personale/DocumentRootApache"
      ServerName localhost
      ServerAlias localhost
      ErrorLog "logs/localhost.com-error.log"
      CustomLog "logs/localhost-access.log" common    
      <Directory "D:/Cesare/Personale/DocumentRootApache">
       Options Indexes FollowSymLinks
       AllowOverride All
       Require all granted
      </Directory>    
    </VirtualHost>
    

    and

    <VirtualHost *:443>
       SSLEngine on
       SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
       SSLCertificateFile "D:/Programmi/ApacheSoftwareFoundation/Apache24/conf/ssl/cesare.cert"
       SSLCertificateKeyFile "D:/Programmi/ApacheSoftwareFoundation/Apache24/conf/ssl/cesare.key"
       ServerAdmin [email protected]
       DocumentRoot "D:/Cesare/Personale/DocumentRootApacheHttps"
       ServerName localhost
       DirectoryIndex index.html, index.cfm, index.php
       ErrorLog "logs/localhost.com-error.log"
       CustomLog "logs/localhost-access.log" common
       <Directory "D:/Cesare/Personale/DocumentRootApacheHttps">
        Options All
        AllowOverride All
       </Directory>
    </VirtualHost>
    

    All the directories exist on my computer, I've checked.

    When I try to access with the url

    https://localhost/index.html
    

    the response is

    Forbidden
    
    You don't have permission to access /index.html on this server.
    

    Any suggestions? I can give other informations about my apache configurations if needed.

    Thank you in advance