Getting Prohibited 403 Error on WAMP Server Using SSL

I just spent the last 4 hours trying to get SSL to work on my local devolopment wamp server (Windows 7).

It seems that now everything is configured fine, well, the server reboots without any errors!

The only problem I can’t solve is the 403 ban when I try to access my site via HTTPS (SSL 443). It works fine on port 80, not 443. The error log shows the following

[error] [client 127.0.0.1] client denied by server configuration: F:/My Webs/freedate/public_html/ 

The following vhost is added in my http.conf file

 <VirtualHost *:80> ServerName www.freedate.local ServerAlias freedate.local *.freedate.local DocumentRoot "F:\My Webs\freedate\public_html" <Directory "F:\My Webs\freedate\public_html"> allow from all order allow,deny # Enables .htaccess files for this site AllowOverride All </Directory> DirectoryIndex index.html index.php </VirtualHost> 

And my httpd-ssl.conf has the following added vhost

 <VirtualHost *:443> SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile "C:/wamp/bin/apache/Apache2.2.21/conf/ssl/server.crt" SSLCertificateKeyFile "C:/wamp/bin/apache/Apache2.2.21/conf/ssl/server.key" ServerName www.freedate.local ServerAlias freedate.local *.freedate.local DocumentRoot "F:\My Webs\freedate\public_html" <Directory "F:\My Webs\freedate\public_html"> Options -Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> DirectoryIndex index.html index.php </VirtualHost> 

If someone can understand what I'm doing wrong, I would be very grateful, thank you very much.

Regards Garry

+4
source share
1 answer

Although this is a very old question, today I am facing the same problem, and I am giving a solution here for those who are facing this problem in the future.

This solution should work if everything works without SSL. Here you can find help without SSL: fooobar.com/questions/16106 / ...

In the httpd-ssl.conf file between the code blocks <VirtualHost _default_:443> and </VirtualHost> you will find something like this:

 <Directory "c:/Apache24/cgi-bin"> SSLOptions +StdEnvVars </Directory> 

After these lines, paste the following code:

 <Directory "c:/wamp64/www/"> #Options FollowSymLinks Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted </Directory> <Directory "c:/wamp64/www/yoursite/"> #Options FollowSymLinks Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require all granted </Directory> 

Basically, this will allow the root directory of the www folder and your site to be accessible in SSL.

Reboot the server and check your site.

Hope this helps.

+1
source

Source: https://habr.com/ru/post/1394052/


All Articles