I am on a LAMP stack with Apache 2.2.15 version. I am not blocking 443 with a firewall in fact I am allowing it.
Successfully installed Let’s Encrypt through the certbot install and HTTPS works but I get a default Apche2 page instead of my website showing. As you can see from the 2 below links. All files ssl.conf and hosts file have all the correct variables and directives. I even used a redirect to HTTPS but it still shows just the default Apache2 page.
The correct document root is set for both HTTP and HTTPS.
I don’t know if you tried to paste the proper <VirtualHost> parts of the configuration file, but perhaps they are missing because of HTML parsing of the forum. You can use the “Preformatted text” button ("</>") to preformat the text as code so all the pieces of the config are showing.
Only this small piece of (visible) config isn’t enough to help you, because I can’t see if you’ve got the proper <VirtualHost *:443> section et cetera.
My apologies Osiris. I did what you mentioned. I looked in all my current conf files and all document roots are /var/www/ so I don’t know why my site goes to a default Apache homepage. I am thinking it is something simple but cannot figure it out.
Thank you Osiris for continuing to support our quest to figure this out. I checked all files and literally I am scratching my head. I do not see any spaces or errors at all.
When tested at SSL Labs I got an “A” for locking this down but still my website will not show. And I have tried to reinstall the certs which is awesome but to no avail since the website still will not show. But the https works! No website though.
Are there any path variables other than the httpd.conf and ssl.conf that need to be set with cert bot? I am scouring your documentation looking for any clue that may help.
Specify LogLevel info in your SSL<VirtualHost *:443> section. Reload your Apache. Then, run a (for example) tail -f /var/log/apache/error.log. (Of course, pointing to the correct error log your Apache/VirtualHost is using!) And see what’s produced when you surf to https://techlick.com/non-existing-file. It should produce something like:
[Fri Aug 19 21:26:54.892409 2016] [core:info] [pid 28479:tid 139916577781504] [client 2001:981:xxxx:1:59da:9114:cfa4:fbcf:52768] AH00128: File does not exist: /var/www/vhosts/example.com/htdocs/non-existing-file
And with that error message, you can verify the correctness of your DocumentRoot/config.
Osiris thank you again for your reply! You were right.
Yes I found the culprit and it appears somehow my original hosts files changed the path from /var/www/ to /var/www/html. Which in all honesty I know I had commented out and replaced with /var/www/ before I even started researching for an https solution.
Anywhoos now I get a directory listing of all my sites only on https ands I have assigned the https cert to a bunch of vhosts.
The install went beautiful but it is these configurations that I need to track down and fix.
Any other suggestions?
Thanks again for your time and support on this issue!
Can’t really help you further besides that your DocumentRootobviously still isn’t correct…
The directory listing you’re referring to is even loaded when entered a fake, non-existing hostname in the HTTP Host header. Probably you have some default (the first) <VirtualHost *:443> which is used.
This server could not prove that it is betterhalf.date; its security certificate is from techlick.com. This may be caused by a misconfiguration or an attacker intercepting your connection.
You are quick. Interesting feedback. HTTP works with the following /var/www/ as DocumentRoot but with HTTPS it is perplexing me.
I agree with you I think it is just a major misconfiguration somewhere in my files. I might start up a new server and see how that works. But thanks for your help and I'll try to get back to you on what really was going on.
I’m not sure why your configuration files are so difficult to manage. The *:443 VirtualHosts should be practically identical to the :*80 ones. Only the SSLCertificateFile, SSLCertificateChainFile and SSLCertificateKeyFile and perhaps some small details, but thinks like DocumentRoot should be identical.
Exactly - the files are identical. I will have to go over this - anyway I am thinking of upgrading the server. Just don’t know why a directory list was showing after I set the DocumentRoot even though all the other files have the correct variables such as htaccess and the conf files.
Thanks again Osiris - I’ll get back to you on this one.
Thank you for the reply - been quite busy - I am actually building a new server and all should be good when I am done. I changed what you noticed and still for some reason it didn’t work - hence the new server. Cheers!
I finally got around to improving my sites and everything is working - the only issue is that I have rss feeds on some pages and it breaks the SSL because these images are served with HTTP. I am trying to figure out what I could do to fix this - so I am googling for an answer. Thought I could do this in my .htaccess file but hasn’t worked.
Most images come from Amazon or eBay. And some from other sites that have the http source.
Any suggestions are welcomed. And thanks for all your help.