Hey everyone,
I wanted to host my own server so I bought a domain (filaamburatori.online) and I have set up a DNS to point to my PC. I am using Apache (apache2) and I have no files at the server now except from default files that come with Apache.
I decided that I should secure connection to my website and I run "sudo certbot --apache" to generate a certificate. I have entered my email, domain and it generated the files, as I was able to see in folders.
now, HTTPS connection won't work. You can access my page on http://filaamburatori.online but as soon as I try to make a https request, I get ERR_SSL_PROTOCOL_ERROR.
I have ensured that my packages are up to date and checked the config and virtual host files where I couldn't see anything that can cause this issue.
If anyone have had a similar issue or knows how to resolve this, I would be grateful.
Also if you have any other questions that can help us resolve this issue, I will be happy to answer them. Thanks in advance!
[edit]
Some more information about my system:
I have ensure to have filaamburatori.online.conf as well as filaamburatori.online-le-ssl.conf linked to
sites-enabled folder.
I have ensured that My server listens to both 80 and 443 port.
I have also confirmed that within my .conf files are correct locations of my fullchain and privkey files and that they are not empty.
Inside VirtualHost *:80 config I comented RewriteEngine to ensure you can access site over http
I have checked my files again, and it should be right.
I see your point but I don't know how to fix it.
I am checking 000-default-le-ssl.conf and 000-default.conf and in first one I have 2 virtual host tags, one listening to 80 and other one on 443. In the second file, I only have virtual host for 80 port.
Also I should have noted that this is my first time trying to deploy a website, as well as use Debian
I think I have it on as I have this in my config file:
Include mypath/options-ssl-apache.conf
with inside:
SSL on
followed by configuration
(provided by certbot)
and after that include, I have:
SSLCertificateFile path/fullchain.pem
SSLCertificateKeyFile path/privkey.pem
It is hard to say what it was doing exactly when the external side information was missing.
My best guess...
[since 80 was reaching 80 and 443 was also reaching 80]
Is that it handled those empty fields as if an "*" had been used and thus forwarded ALL ports to 80.
[the first line handled ALL the requests - and the second line never got used]
Once you filled in the missing external port information, it then started doing what you expected.
So... it was never an "SSLEngine On" issue.
But I'm glad we were able to find, and correct, the problem relatively quickly none-the-less