0

I followed this tutorial install SSL http://guides.jlbn.net/setssl/setssl1.html

I setup up to localhost

after the configuration, I able to access HTTPS (https:// localhost/) however, when I want to access to HTTP (http:// localhost/)

It display

Bad Request

Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: https:// localhost/

How do I make both HTTP and HTTPS works?

I read SSL - how to make both http and https work I also add VirtualHost for 80 and 443 to httpd.conf. But no luck.

Please help. Thanks

-httpd.conf (related)-

LoadModule ssl_module modules/mod_ssl.so
ServerName localhost:80
DocumentRoot "c:/wamp/www/"
<Directory "c:/wamp/www/">

    Options Indexes FollowSymLinks

    AllowOverride all   

    Order Deny,Allow
    Allow from all

</Directory>

NameVirtualHost *

<VirtualHost *:80>
        ServerName localhost
        DocumentRoot "c:/wamp/www"
</VirtualHost>

-httpd-ssl.conf (related)-

Listen 443
<VirtualHost _default_:443>

DocumentRoot "C:/wamp/www/ssl"
ServerName localhost
ServerAdmin admin@localhost
ErrorLog "C:/wamp/bin/Apache/apache2.2.21/conf/ssl/logs/ssl_error.log"
TransferLog "C:/wamp/bin/Apache/apache2.2.21/conf/ssl/logs/ssl_access.log"

SSLEngine on

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile "C:/wamp/bin/Apache/apache2.2.21/conf/ssl/localhost.crt"


SSLCertificateKeyFile "C:/wamp/bin/Apache/apache2.2.21/conf/ssl/localhost.key"

#SSLCertificateChainFile "c:/Apache2/conf/server-ca.crt"

#SSLCACertificatePath "c:/Apache2/conf/ssl.crt"
#SSLCACertificateFile "c:/Apache2/conf/ssl.crt/ca-bundle.crt"

#SSLCARevocationPath "c:/Apache2/conf/ssl.crl"
#SSLCARevocationFile "c:/Apache2/conf/ssl.crl/ca-bundle.crl"

#SSLVerifyClient require
#SSLVerifyDepth  10

#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/wamp/www/ssl">
    SSLOptions +StdEnvVars
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

BrowserMatch ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

CustomLog   "C:/wamp/logs/ssl_request.log" \
            "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"


</VirtualHost>                                  
Shiro
  • 823
  • 8
  • 13

1 Answers1

1

Gosh... I found the problem already.

It happen at httpd.conf Previously I just run with port 80 (HTTP) my httpd.conf just enter

NameVirtualHost *

It has to be enter like this

NameVirtualHost *:80

The port need to specific.

After that my WAMP server work like a charm!

Shiro
  • 823
  • 8
  • 13
  • am facing similar issue, can you help me http://stackoverflow.com/questions/40652422/could-not-bind-to-address-443-in-wamp – niran Nov 18 '16 at 12:08