Answers for "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.Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.9 Server"

1

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.

This is totally possible. The following redirects all http to the https url.

<VirtualHost *:80>

    -- snip --
    
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>


<VirtualHost *:443>

    -- snip --

    SSLEngine on
    SSLCertificateFile /var/www/ssl/STAR_iconcierge_net_au.crt
    SSLCertificateKeyFile /var/www/ssl/STAR_iconcierge_net_au.key
    SSLCertificateChainFile /var/www/ssl/STAR_iconcierge_net_au.crt

</VirtualHost>

Notice how *:80 (http) enacts a rewrite to *:443 (https), which then enforces 
SSL with the SSLEngine on directive.
Posted by: Guest on April-08-2021

Code answers related to "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.Apache/2.4.48 (Win64) OpenSSL/1.1.1k PHP/8.0.9 Server"

Browse Popular Code Answers by Language