After enabling HTTPS on my Apache2 server - I get 404 errors on every request [closed]

Is it absolutely necessary to redirect all http requests to https? Cause it seems that's what you're trying to do here.

I suggest you start by removing the following lines from your conf:

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=302]

I suspect the syntax may be wrong there. Then try connecting again on each http:// and https:// protocols.


I can't exactly remember how I figured it out, but I stumbled across something somewhere that suggested to put:

<VirtualHost _default_:443>

Instead of:

<VirtualHost *:443>

Since replacing that, my SSL has been working perfectly.