LetsEncrypt installed properly but still get warning

/etc/apache2/sites-enabled/scrap-heap.com-le-ssl.conf

<VirtualHost *:443>
ServerName scrap-heap.com
ServerAlias www.scrap-heap.com
ServerAdmin webmaster@scrap-heap.com
DocumentRoot /var/www/scrap-heap.com/public_html

<Directory /var/www/scrap-heap.com/public_html>
    Options -Indexes +FollowSymLinks
    AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/scrap-heap.com-error.log
CustomLog ${APACHE_LOG_DIR}/scrap-heap.com-access.log combined

SSLCertificateFile /etc/letsencrypt/live/scrap-heap.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/scrap-heap.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

Thank you kindly!!!!

1 Like

Looks like you could just delete this one. If it's symlink'd to the one in sites-available just remove the symlink. You could keep a backup just for reference.

Update: Mind you, this is just step 1. More seems to be involved but start here and report back after restarting Apache.

6 Likes

Hello Mike..... Thanks again. Can't say it enough. File deleted. Still running a Forbidden error. Don't get it......

Here is some more info: https://codecreatordigitalassests.s3.amazonaws.com/Scrapheap+SSL.pdf

1 Like

@CodeCreatorLLC .. @MikeMcQ
Look at the images closely... :face_with_monocle:
I think the configured document root is "hosed".

From one of the images above:
DocumentRoot /var/www/scrap-heap.com/public_html

BUT output from
apache2ctl -S shows:
DocumentRoot /var/www/html

That would cause a 403 error for sure...
Might look into that!

5 Likes

What is one of the files in this folder?

7 Likes

image
Both files directory files are empty inside

1 Like

That folder is supposed to contain the files you want your server to, well, serve to browsers / clients.

Requests are failing because you don't have anything there. Either the DocumentRoot value is wrong or you have the files in the wrong place.

7 Likes

Yeah, thanks for tip but was hot on that trail already :slight_smile: see post #16

I think the -S output just shows the Apache default though and not unique values from each VirtualHost.

7 Likes

If the folder were merely empty it would not throw a 403. It would throw a 404 Not Found error.
Empty Folder Example:
Screenshot_2022-02-11_11-42-31

7 Likes

Interesting. It was throwing 404 for specific page requests just a 403 for the default "index" page. In any event, agree it seems some fundamental setup problems exist. Puzzling as they have been getting certs for a long time so I am surprised at this sort of problem at this stage.

6 Likes

Yup I concur.

6 Likes

In the main Aapche.conf file, look for a section like:

<Directory "some.path">
...
</Directory>

It likely only provides access to
/var/www/html
So, /var/www is undefined and returns 403.
If so, use the format found for /var/www/html to create another Directory section for /var/www.
Better yet, move the DocumentRoot from /var/www to something more restrictive, like:
/var/www/html/XXX

6 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.