SSL certificated not working

Hi All?
I have installed Let's Encrypt on Centos 8 by following https://www.digitaloc
ean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-centos-8

The let's encrypt has been installed, the certificate files have been generated, and auto /etc/httpd/sites-available/thinkingfree.org-le-ssl.conf config file for ssl has been created.
There is no fatal error in httpd server logs, no fatal error in let'sencrypt logs at following path. /var/log/letsencrypt/letsencrypt.log but still SSL not working for my website. The URL is given below. https://thinkingfree.org/piwik/

The httpd server logs are below.
[Sat Jul 17 16:11:15.624493 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 16:11:15.758440 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 16:54:38.630029 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 16:59:40.844300 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 16:59:45.353276 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 16:59:47.655957 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 16:59:52.980805 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 16:59:58.432963 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 17:00:02.650882 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 17:00:04.894383 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 17:00:09.923516 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 17:00:13.429092 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 17:16:21.344325 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 18:37:21.704105 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sat Jul 17 18:49:39.298253 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name
[Sun Jul 18 03:17:02.214819 2021] [ssl:warn] [pid 98326:tid 140663162267968] AH01909: www.thinkingfree.org:443:0 server certificate does NOT include an ID which matches the server name

Any help would be appreciated.
Thanks!

1 Like

Welcome to the Let's Encrypt Community :slightly_smiling_face:

At present, thinkingfree.org and www.thinkingfree.org are both serving this (incorrect) certificate:

Please show the output of:
sudo apachectl -S

1 Like

Here is the output of Sudo apachectl -S
irtualHost configuration:
88.99.190.130:443 www.samtuke.com (/etc/httpd/sites-available/samtuke.com-le-ssl.conf:2)
*:80 is a NameVirtualHost
default server www.samtuke.com (/etc/httpd/sites-enabled/samtuke.com.conf:1)
port 80 namevhost www.samtuke.com (/etc/httpd/sites-enabled/samtuke.com.conf:1)
alias samtuke.com
port 80 namevhost www.thinkingfree.org (/etc/httpd/sites-enabled/thinkingfree.org.conf:1)
alias thinkingfree.org
*:443 is a NameVirtualHost
default server samtuke.com (/etc/httpd/conf.d/ssl.conf:40)
port 443 namevhost samtuke.com (/etc/httpd/conf.d/ssl.conf:40)
port 443 namevhost thinkingfree.org (/etc/httpd/sites-available/thinkingfree.org-le-ssl.conf:2)
alias www.thinkingfree.org
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/etc/httpd/run/" mechanism=default
Mutex cache-socache: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/etc/httpd/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="apache" id=48
Group: name="apache" id=48

1 Like

Can you please guide me why it is incorrect certificate and how can I generate correct certificate?

1 Like

What are the outputs of:

sudo ls -lRa /etc/httpd
sudo ls -lRa /etc/letsencrypt
sudo certbot certificates
sudo cat /etc/httpd/conf.d/ssl.conf
sudo cat /etc/httpd/sites-available/samtuke.com-le-ssl.conf
sudo cat /etc/httpd/sites-available/thinkingfree.org-le-ssl.conf
sudo cat /etc/httpd/sites-enabled/samtuke.com.conf
sudo cat /etc/httpd/sites-enabled/thinkingfree.org.conf

Please put 3 backticks above and below each output, like this:

```
output
```

1 Like

The output of sudo ls -lRa /etc/httpd

/etc/httpd:
total 28
drwxr-xr-x. 7 root root 4096 Jul 17 17:00 .
drwxr-xr-x. 94 root root 4096 Jul 17 15:44 ..
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 conf
drwxr-xr-x. 2 root root 4096 Jul 17 17:00 conf.d
drwxr-xr-x. 2 root root 4096 Jul 11 13:44 conf.modules.d
lrwxrwxrwx. 1 root root 19 Jun 29 22:09 logs -> ../../var/log/httpd
lrwxrwxrwx. 1 root root 29 Jun 29 22:09 modules -> ../../usr/lib64/httpd/modules
lrwxrwxrwx. 1 root root 10 Jun 29 22:09 run -> /run/httpd
drwxr-xr-x. 2 root root 4096 Jul 19 05:48 sites-available
drwxr-xr-x. 2 root root 4096 Jul 17 18:49 sites-enabled
lrwxrwxrwx. 1 root root 19 Jun 29 22:09 state -> ../../var/lib/httpd

/etc/httpd/conf:
total 36
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 .
drwxr-xr-x. 7 root root 4096 Jul 17 17:00 ..
-rw-r--r--. 1 root root 12127 Jul 17 16:01 httpd.conf
-rw-r--r--. 1 root root 13064 Jun 29 22:09 magic

/etc/httpd/conf.d:
total 40
drwxr-xr-x. 2 root root 4096 Jul 17 17:00 .
drwxr-xr-x. 7 root root 4096 Jul 17 17:00 ..
-rw-r--r--. 1 root root 400 Jun 29 22:11 README
-rw-r--r--. 1 root root 2926 Jun 29 22:09 autoindex.conf
-rw-r--r--. 1 root root 1618 May 7 2020 php.conf
-rw-r--r--. 1 root root 8737 Mar 17 10:47 ssl.conf
-rw-r--r--. 1 root root 1252 Jun 29 22:07 userdir.conf
-rw-r--r--. 1 root root 574 Jun 29 22:07 welcome.conf

/etc/httpd/conf.modules.d:
total 60
drwxr-xr-x. 2 root root 4096 Jul 11 13:44 .
drwxr-xr-x. 7 root root 4096 Jul 17 17:00 ..
-rw-r--r--. 1 root root 3311 Jun 29 22:07 00-base.conf
-rw-r--r--. 1 root root 139 Jun 29 22:07 00-dav.conf
-rw-r--r--. 1 root root 41 Jun 29 22:07 00-lua.conf
-rw-r--r--. 1 root root 948 Jun 29 22:07 00-mpm.conf
-rw-r--r--. 1 root root 787 Jun 29 22:07 00-optional.conf
-rw-r--r--. 1 root root 1073 Jun 29 22:07 00-proxy.conf
-rw-r--r--. 1 root root 41 Jun 29 22:07 00-ssl.conf
-rw-r--r--. 1 root root 88 Jun 29 22:07 00-systemd.conf
-rw-r--r--. 1 root root 451 Jun 29 22:07 01-cgi.conf
-rw-r--r--. 1 root root 45 May 20 06:43 10-h2.conf
-rw-r--r--. 1 root root 57 May 20 06:43 10-proxy_h2.conf
-rw-r--r--. 1 root root 299 May 7 2020 15-php.conf
-rw-r--r--. 1 root root 496 Jun 29 22:09 README

/etc/httpd/sites-available:
total 24
drwxr-xr-x. 2 root root 4096 Jul 19 05:48 .
drwxr-xr-x. 7 root root 4096 Jul 17 17:00 ..
-rw-r--r--. 1 root root 611 Mar 17 11:39 samtuke.com-le-ssl.conf
-rw-r--r--. 1 root root 550 Jun 16 15:08 samtuke.com.conf
-rw-r--r--. 1 root root 506 Jul 19 05:48 thinkingfree.org-le-ssl.conf
-rw-r--r--. 1 root root 466 Jul 18 04:42 thinkingfree.org.conf

/etc/httpd/sites-enabled:
total 8
drwxr-xr-x. 2 root root 4096 Jul 17 18:49 .
drwxr-xr-x. 7 root root 4096 Jul 17 17:00 ..
lrwxrwxrwx. 1 root root 43 Mar 14 19:09 samtuke.com.conf -> /etc/httpd/sites-available/samtuke.com.conf
lrwxrwxrwx. 1 root root 48 Mar 14 19:33 thinkingfree.org.conf -> /etc/httpd/sites-available/thinkingfree.org.conf

The output of sudo ls -lRa /etc/letsencrypt
/etc/letsencrypt:
total 44
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 .
drwxr-xr-x. 94 root root 4096 Jul 17 15:44 ..
-rw-r--r--. 1 root root 64 Mar 17 10:44 .updated-options-ssl-apache-conf-digest.txt
drwx------. 4 root root 4096 Jun 16 15:08 accounts
drwx------. 5 root root 4096 Jul 17 16:11 archive
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 csr
drwx------. 2 root root 4096 Jul 17 16:11 keys
drwx------. 5 root root 4096 Jul 17 16:11 live
-rw-r--r--. 1 root root 952 Mar 17 11:34 options-ssl-apache.conf
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 renewal
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 renewal-hooks

/etc/letsencrypt/accounts:
total 16
drwx------. 4 root root 4096 Jun 16 15:08 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
drwx------. 3 root root 4096 Jun 16 15:08 acme-staging-v02.api.letsencrypt.org
drwx------. 3 root root 4096 Mar 17 10:32 acme-v02.api.letsencrypt.org

/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org:
total 12
drwx------. 3 root root 4096 Jun 16 15:08 .
drwx------. 4 root root 4096 Jun 16 15:08 ..
drwx------. 3 root root 4096 Jun 16 15:08 directory

/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory:
total 12
drwx------. 3 root root 4096 Jun 16 15:08 .
drwx------. 3 root root 4096 Jun 16 15:08 ..
drwx------. 2 root root 4096 Jun 16 15:08 522156640293e7d37dfa75bd71a806a3

/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory/522156640293e7d37dfa75bd71a806a3:
total 20
drwx------. 2 root root 4096 Jun 16 15:08 .
drwx------. 3 root root 4096 Jun 16 15:08 ..
-rw-r--r--. 1 root root 71 Jun 16 15:08 meta.json
-r--------. 1 root root 1632 Jun 16 15:08 private_key.json
-rw-r--r--. 1 root root 86 Jun 16 15:08 regr.json

/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org:
total 12
drwx------. 3 root root 4096 Mar 17 10:32 .
drwx------. 4 root root 4096 Jun 16 15:08 ..
drwx------. 3 root root 4096 Mar 17 10:33 directory

/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory:
total 12
drwx------. 3 root root 4096 Mar 17 10:33 .
drwx------. 3 root root 4096 Mar 17 10:32 ..
drwx------. 2 root root 4096 Mar 17 10:33 b372c11eb66949aa0a46f6292f6023fb

/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/b372c11eb66949aa0a46f6292f6023fb:
total 20
drwx------. 2 root root 4096 Mar 17 10:33 .
drwx------. 3 root root 4096 Mar 17 10:33 ..
-rw-r--r--. 1 root root 71 Mar 17 10:33 meta.json
-r--------. 1 root root 1632 Mar 17 10:33 private_key.json
-rw-r--r--. 1 root root 79 Mar 17 10:33 regr.json

/etc/letsencrypt/archive:
total 20
drwx------. 5 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 thinkingfree.org
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 thinkingfree.org-0001
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 www.samtuke.com

/etc/letsencrypt/archive/thinkingfree.org:
total 28
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 1879 Jul 17 16:01 cert1.pem
-rw-r--r--. 1 root root 3749 Jul 17 16:01 chain1.pem
-rw-r--r--. 1 root root 5628 Jul 17 16:01 fullchain1.pem
-rw-------. 1 root root 1704 Jul 17 16:01 privkey1.pem

/etc/letsencrypt/archive/thinkingfree.org-0001:
total 28
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 1846 Jul 17 16:11 cert1.pem
-rw-r--r--. 1 root root 3749 Jul 17 16:11 chain1.pem
-rw-r--r--. 1 root root 5595 Jul 17 16:11 fullchain1.pem
-rw-------. 1 root root 1704 Jul 17 16:11 privkey1.pem

/etc/letsencrypt/archive/www.samtuke.com:
total 44
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 1862 Mar 17 10:48 cert1.pem
-rw-r--r--. 1 root root 1862 Jun 16 15:13 cert2.pem
-rw-r--r--. 1 root root 1586 Mar 17 10:48 chain1.pem
-rw-r--r--. 1 root root 3749 Jun 16 15:13 chain2.pem
-rw-r--r--. 1 root root 3448 Mar 17 10:48 fullchain1.pem
-rw-r--r--. 1 root root 5611 Jun 16 15:13 fullchain2.pem
-rw-------. 1 root root 1704 Mar 17 10:48 privkey1.pem
-rw-------. 1 root root 1704 Jun 16 15:13 privkey2.pem

/etc/letsencrypt/csr:
total 48
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-r--r--. 1 root root 944 Mar 17 10:34 0000_csr-certbot.pem
-rw-r--r--. 1 root root 944 Mar 17 10:44 0001_csr-certbot.pem
-rw-r--r--. 1 root root 944 Mar 17 10:45 0002_csr-certbot.pem
-rw-r--r--. 1 root root 944 Mar 17 10:48 0003_csr-certbot.pem
-rw-r--r--. 1 root root 944 Jun 14 12:25 0004_csr-certbot.pem
-rw-r--r--. 1 root root 944 Jun 14 18:06 0005_csr-certbot.pem
-rw-r--r--. 1 root root 944 Jun 16 14:26 0006_csr-certbot.pem
-rw-r--r--. 1 root root 944 Jun 16 15:13 0007_csr-certbot.pem
-rw-r--r--. 1 root root 956 Jul 17 16:01 0008_csr-certbot.pem
-rw-r--r--. 1 root root 928 Jul 17 16:11 0009_csr-certbot.pem

/etc/letsencrypt/keys:
total 48
drwx------. 2 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-------. 1 root root 1708 Mar 17 10:34 0000_key-certbot.pem
-rw-------. 1 root root 1704 Mar 17 10:44 0001_key-certbot.pem
-rw-------. 1 root root 1704 Mar 17 10:45 0002_key-certbot.pem
-rw-------. 1 root root 1704 Mar 17 10:48 0003_key-certbot.pem
-rw-------. 1 root root 1704 Jun 14 12:25 0004_key-certbot.pem
-rw-------. 1 root root 1704 Jun 14 18:06 0005_key-certbot.pem
-rw-------. 1 root root 1704 Jun 16 14:26 0006_key-certbot.pem
-rw-------. 1 root root 1704 Jun 16 15:13 0007_key-certbot.pem
-rw-------. 1 root root 1704 Jul 17 16:01 0008_key-certbot.pem
-rw-------. 1 root root 1704 Jul 17 16:11 0009_key-certbot.pem

/etc/letsencrypt/live:
total 24
drwx------. 5 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-r--r--. 1 root root 740 Mar 17 10:48 README
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 thinkingfree.org
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 thinkingfree.org-0001
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 www.samtuke.com

/etc/letsencrypt/live/thinkingfree.org:
total 12
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 692 Jul 17 16:01 README
lrwxrwxrwx. 1 root root 40 Jul 17 16:01 cert.pem -> ../../archive/thinkingfree.org/cert1.pem
lrwxrwxrwx. 1 root root 41 Jul 17 16:01 chain.pem -> ../../archive/thinkingfree.org/chain1.pem
lrwxrwxrwx. 1 root root 45 Jul 17 16:01 fullchain.pem -> ../../archive/thinkingfree.org/fullchain1.pem
lrwxrwxrwx. 1 root root 43 Jul 17 16:01 privkey.pem -> ../../archive/thinkingfree.org/privkey1.pem

/etc/letsencrypt/live/thinkingfree.org-0001:
total 12
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 692 Jul 17 16:11 README
lrwxrwxrwx. 1 root root 45 Jul 17 16:11 cert.pem -> ../../archive/thinkingfree.org-0001/cert1.pem
lrwxrwxrwx. 1 root root 46 Jul 17 16:11 chain.pem -> ../../archive/thinkingfree.org-0001/chain1.pem
lrwxrwxrwx. 1 root root 50 Jul 17 16:11 fullchain.pem -> ../../archive/thinkingfree.org-0001/fullchain1.pem
lrwxrwxrwx. 1 root root 48 Jul 17 16:11 privkey.pem -> ../../archive/thinkingfree.org-0001/privkey1.pem

/etc/letsencrypt/live/www.samtuke.com:
total 12
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 692 Mar 17 10:48 README
lrwxrwxrwx. 1 root root 39 Jun 16 15:13 cert.pem -> ../../archive/www.samtuke.com/cert2.pem
lrwxrwxrwx. 1 root root 40 Jun 16 15:13 chain.pem -> ../../archive/www.samtuke.com/chain2.pem
lrwxrwxrwx. 1 root root 44 Jun 16 15:13 fullchain.pem -> ../../archive/www.samtuke.com/fullchain2.pem
lrwxrwxrwx. 1 root root 42 Jun 16 15:13 privkey.pem -> ../../archive/www.samtuke.com/privkey2.pem

/etc/letsencrypt/renewal:
total 20
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-r--r--. 1 root root 564 Jul 17 16:11 thinkingfree.org-0001.conf
-rw-r--r--. 1 root root 539 Jul 17 16:01 thinkingfree.org.conf
-rw-r--r--. 1 root root 534 Jun 16 15:13 www.samtuke.com.conf

/etc/letsencrypt/renewal-hooks:
total 20
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 deploy
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 post
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 pre

/etc/letsencrypt/renewal-hooks/deploy:
total 8
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 ..

/etc/letsencrypt/renewal-hooks/post:
total 8
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 ..

/etc/letsencrypt/renewal-hooks/pre:
total 8
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 ..

1 Like

Looking good so far. Some small things to cleanup.

1 Like
/etc/letsencrypt:
total 44
drwxr-xr-x.  9 root root 4096 Jul 19 00:05 .
drwxr-xr-x. 94 root root 4096 Jul 17 15:44 ..
-rw-r--r--.  1 root root   64 Mar 17 10:44 .updated-options-ssl-apache-conf-digest.txt
drwx------.  4 root root 4096 Jun 16 15:08 accounts
drwx------.  5 root root 4096 Jul 17 16:11 archive
drwxr-xr-x.  2 root root 4096 Jul 17 16:11 csr
drwx------.  2 root root 4096 Jul 17 16:11 keys
drwx------.  5 root root 4096 Jul 17 16:11 live
-rw-r--r--.  1 root root  952 Mar 17 11:34 options-ssl-apache.conf
drwxr-xr-x.  2 root root 4096 Jul 17 16:11 renewal
drwxr-xr-x.  5 root root 4096 Mar 17 10:30 renewal-hooks

/etc/letsencrypt/accounts:
total 16
drwx------. 4 root root 4096 Jun 16 15:08 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
drwx------. 3 root root 4096 Jun 16 15:08 acme-staging-v02.api.letsencrypt.org
drwx------. 3 root root 4096 Mar 17 10:32 acme-v02.api.letsencrypt.org

/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org:
total 12
drwx------. 3 root root 4096 Jun 16 15:08 .
drwx------. 4 root root 4096 Jun 16 15:08 ..
drwx------. 3 root root 4096 Jun 16 15:08 directory

/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory:
total 12
drwx------. 3 root root 4096 Jun 16 15:08 .
drwx------. 3 root root 4096 Jun 16 15:08 ..
drwx------. 2 root root 4096 Jun 16 15:08 522156640293e7d37dfa75bd71a806a3

/etc/letsencrypt/accounts/acme-staging-v02.api.letsencrypt.org/directory/522156640293e7d37dfa75bd71a806a3:
total 20
drwx------. 2 root root 4096 Jun 16 15:08 .
drwx------. 3 root root 4096 Jun 16 15:08 ..
-rw-r--r--. 1 root root   71 Jun 16 15:08 meta.json
-r--------. 1 root root 1632 Jun 16 15:08 private_key.json
-rw-r--r--. 1 root root   86 Jun 16 15:08 regr.json

/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org:
total 12
drwx------. 3 root root 4096 Mar 17 10:32 .
drwx------. 4 root root 4096 Jun 16 15:08 ..
drwx------. 3 root root 4096 Mar 17 10:33 directory

/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory:
total 12
drwx------. 3 root root 4096 Mar 17 10:33 .
drwx------. 3 root root 4096 Mar 17 10:32 ..
drwx------. 2 root root 4096 Mar 17 10:33 b372c11eb66949aa0a46f6292f6023fb

/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/b372c11eb66949aa0a46f6292f6023fb:
total 20
drwx------. 2 root root 4096 Mar 17 10:33 .
drwx------. 3 root root 4096 Mar 17 10:33 ..
-rw-r--r--. 1 root root   71 Mar 17 10:33 meta.json
-r--------. 1 root root 1632 Mar 17 10:33 private_key.json
-rw-r--r--. 1 root root   79 Mar 17 10:33 regr.json

/etc/letsencrypt/archive:
total 20
drwx------. 5 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 thinkingfree.org
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 thinkingfree.org-0001
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 www.samtuke.com

/etc/letsencrypt/archive/thinkingfree.org:
total 28
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 1879 Jul 17 16:01 cert1.pem
-rw-r--r--. 1 root root 3749 Jul 17 16:01 chain1.pem
-rw-r--r--. 1 root root 5628 Jul 17 16:01 fullchain1.pem
-rw-------. 1 root root 1704 Jul 17 16:01 privkey1.pem

/etc/letsencrypt/archive/thinkingfree.org-0001:
total 28
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 1846 Jul 17 16:11 cert1.pem
-rw-r--r--. 1 root root 3749 Jul 17 16:11 chain1.pem
-rw-r--r--. 1 root root 5595 Jul 17 16:11 fullchain1.pem
-rw-------. 1 root root 1704 Jul 17 16:11 privkey1.pem

/etc/letsencrypt/archive/www.samtuke.com:
total 44
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root 1862 Mar 17 10:48 cert1.pem
-rw-r--r--. 1 root root 1862 Jun 16 15:13 cert2.pem
-rw-r--r--. 1 root root 1586 Mar 17 10:48 chain1.pem
-rw-r--r--. 1 root root 3749 Jun 16 15:13 chain2.pem
-rw-r--r--. 1 root root 3448 Mar 17 10:48 fullchain1.pem
-rw-r--r--. 1 root root 5611 Jun 16 15:13 fullchain2.pem
-rw-------. 1 root root 1704 Mar 17 10:48 privkey1.pem
-rw-------. 1 root root 1704 Jun 16 15:13 privkey2.pem

/etc/letsencrypt/csr:
total 48
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-r--r--. 1 root root  944 Mar 17 10:34 0000_csr-certbot.pem
-rw-r--r--. 1 root root  944 Mar 17 10:44 0001_csr-certbot.pem
-rw-r--r--. 1 root root  944 Mar 17 10:45 0002_csr-certbot.pem
-rw-r--r--. 1 root root  944 Mar 17 10:48 0003_csr-certbot.pem
-rw-r--r--. 1 root root  944 Jun 14 12:25 0004_csr-certbot.pem
-rw-r--r--. 1 root root  944 Jun 14 18:06 0005_csr-certbot.pem
-rw-r--r--. 1 root root  944 Jun 16 14:26 0006_csr-certbot.pem
-rw-r--r--. 1 root root  944 Jun 16 15:13 0007_csr-certbot.pem
-rw-r--r--. 1 root root  956 Jul 17 16:01 0008_csr-certbot.pem
-rw-r--r--. 1 root root  928 Jul 17 16:11 0009_csr-certbot.pem

/etc/letsencrypt/keys:
total 48
drwx------. 2 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-------. 1 root root 1708 Mar 17 10:34 0000_key-certbot.pem
-rw-------. 1 root root 1704 Mar 17 10:44 0001_key-certbot.pem
-rw-------. 1 root root 1704 Mar 17 10:45 0002_key-certbot.pem
-rw-------. 1 root root 1704 Mar 17 10:48 0003_key-certbot.pem
-rw-------. 1 root root 1704 Jun 14 12:25 0004_key-certbot.pem
-rw-------. 1 root root 1704 Jun 14 18:06 0005_key-certbot.pem
-rw-------. 1 root root 1704 Jun 16 14:26 0006_key-certbot.pem
-rw-------. 1 root root 1704 Jun 16 15:13 0007_key-certbot.pem
-rw-------. 1 root root 1704 Jul 17 16:01 0008_key-certbot.pem
-rw-------. 1 root root 1704 Jul 17 16:11 0009_key-certbot.pem

/etc/letsencrypt/live:
total 24
drwx------. 5 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-r--r--. 1 root root  740 Mar 17 10:48 README
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 thinkingfree.org
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 thinkingfree.org-0001
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 www.samtuke.com

/etc/letsencrypt/live/thinkingfree.org:
total 12
drwxr-xr-x. 2 root root 4096 Jul 17 16:01 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root  692 Jul 17 16:01 README
lrwxrwxrwx. 1 root root   40 Jul 17 16:01 cert.pem -> ../../archive/thinkingfree.org/cert1.pem
lrwxrwxrwx. 1 root root   41 Jul 17 16:01 chain.pem -> ../../archive/thinkingfree.org/chain1.pem
lrwxrwxrwx. 1 root root   45 Jul 17 16:01 fullchain.pem -> ../../archive/thinkingfree.org/fullchain1.pem
lrwxrwxrwx. 1 root root   43 Jul 17 16:01 privkey.pem -> ../../archive/thinkingfree.org/privkey1.pem

/etc/letsencrypt/live/thinkingfree.org-0001:
total 12
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root  692 Jul 17 16:11 README
lrwxrwxrwx. 1 root root   45 Jul 17 16:11 cert.pem -> ../../archive/thinkingfree.org-0001/cert1.pem
lrwxrwxrwx. 1 root root   46 Jul 17 16:11 chain.pem -> ../../archive/thinkingfree.org-0001/chain1.pem
lrwxrwxrwx. 1 root root   50 Jul 17 16:11 fullchain.pem -> ../../archive/thinkingfree.org-0001/fullchain1.pem
lrwxrwxrwx. 1 root root   48 Jul 17 16:11 privkey.pem -> ../../archive/thinkingfree.org-0001/privkey1.pem

/etc/letsencrypt/live/www.samtuke.com:
total 12
drwxr-xr-x. 2 root root 4096 Jun 16 15:13 .
drwx------. 5 root root 4096 Jul 17 16:11 ..
-rw-r--r--. 1 root root  692 Mar 17 10:48 README
lrwxrwxrwx. 1 root root   39 Jun 16 15:13 cert.pem -> ../../archive/www.samtuke.com/cert2.pem
lrwxrwxrwx. 1 root root   40 Jun 16 15:13 chain.pem -> ../../archive/www.samtuke.com/chain2.pem
lrwxrwxrwx. 1 root root   44 Jun 16 15:13 fullchain.pem -> ../../archive/www.samtuke.com/fullchain2.pem
lrwxrwxrwx. 1 root root   42 Jun 16 15:13 privkey.pem -> ../../archive/www.samtuke.com/privkey2.pem

/etc/letsencrypt/renewal:
total 20
drwxr-xr-x. 2 root root 4096 Jul 17 16:11 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
-rw-r--r--. 1 root root  564 Jul 17 16:11 thinkingfree.org-0001.conf
-rw-r--r--. 1 root root  539 Jul 17 16:01 thinkingfree.org.conf
-rw-r--r--. 1 root root  534 Jun 16 15:13 www.samtuke.com.conf

/etc/letsencrypt/renewal-hooks:
total 20
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 9 root root 4096 Jul 19 00:05 ..
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 deploy
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 post
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 pre

/etc/letsencrypt/renewal-hooks/deploy:
total 8
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 ..

/etc/letsencrypt/renewal-hooks/post:
total 8
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 ..

/etc/letsencrypt/renewal-hooks/pre:
total 8
drwxr-xr-x. 2 root root 4096 Mar 17 10:30 .
drwxr-xr-x. 5 root root 4096 Mar 17 10:30 ..
[hafiznaseraslam@samtuke ~]$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: thinkingfree.org-0001
    Serial Number: 3ebd665cb36313d31031eb436163a56609e
    Key Type: RSA
    Domains: thinkingfree.org
    Expiry Date: 2021-10-15 13:11:11+00:00 (VALID: 88 days)
    Certificate Path: /etc/letsencrypt/live/thinkingfree.org-0001/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/thinkingfree.org-0001/privkey.pem
  Certificate Name: thinkingfree.org
    Serial Number: 314de565ba406eb8c7eac2779d2170619eb
    Key Type: RSA
    Domains: thinkingfree.org www.thinkingfree.org
    Expiry Date: 2021-10-15 13:01:36+00:00 (VALID: 88 days)
    Certificate Path: /etc/letsencrypt/live/thinkingfree.org/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/thinkingfree.org/privkey.pem
  Certificate Name: www.samtuke.com
    Serial Number: 478a17742b005568b67e86a002ac76cd830
    Key Type: RSA
    Domains: www.samtuke.com samtuke.com
    Expiry Date: 2021-09-14 12:13:29+00:00 (VALID: 57 days)
    Certificate Path: /etc/letsencrypt/live/www.samtuke.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/www.samtuke.com/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

sudo cat /etc/httpd/conf.d/ssl.conf

#
# When we also provide SSL we have to listen to the 
# standard HTTPS port in addition.
#
Listen 443 https

##
##  SSL Global Context
##
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.
##

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism 
#   to use and second the expiring timeout (in seconds).
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout  300

#
# Use "SSLCryptoDevice" to enable any supported hardware
# accelerators. Use "openssl engine -v" to list supported
# engine names.  NOTE: If you enable an accelerator and the
# server does not start, consult the error logs and ensure
# your accelerator is functioning properly. 
#
SSLCryptoDevice builtin
#SSLCryptoDevice ubsec

##
## SSL Virtual Host Context
##

<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration
#DocumentRoot "/var/www/html"
#ServerName www.example.com:443

# Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf.
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn

#   SSL Engine Switch:
#   Enable/Disable SSL for this virtual host.
#SSLEngine on
SSLEngine off

#   List the protocol versions which clients are allowed to connect with.
#   The OpenSSL system profile is used by default.  See
#   update-crypto-policies(8) for more details.
#SSLProtocol all -SSLv3
#SSLProxyProtocol all -SSLv3

#   User agents such as web browsers are not configured for the user's
#   own preference of either security or performance, therefore this
#   must be the prerogative of the web server administrator who manages
#   cpu load versus confidentiality, so enforce the server's cipher order.
SSLHonorCipherOrder on

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate.
#   See the mod_ssl documentation for a complete list.
#   The OpenSSL system profile is configured by default.  See
#   update-crypto-policies(8) for more details.
SSLCipherSuite PROFILE=SYSTEM
SSLProxyCipherSuite PROFILE=SYSTEM

#   Point SSLCertificateFile at a PEM encoded certificate.  If
#   the certificate is encrypted, then you will be prompted for a
#   pass phrase.  Note that restarting httpd will prompt again.  Keep
#   in mind that if you have both an RSA and a DSA certificate you
#   can configure both in parallel (to also allow the use of DSA
#   ciphers, etc.)
#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
#   require an ECC certificate which can also be configured in
#   parallel.
#SSLCertificateFile /etc/pki/tls/certs/localhost.crt

#   Server Private Key:
#   If the key is not combined with the certificate, use this
#   directive to point at the key file.  Keep in mind that if
#   you've both a RSA and a DSA private key you can configure
#   both in parallel (to also allow the use of DSA ciphers, etc.)
#   ECC keys, when in use, can also be configured in parallel
#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

#   Server Certificate Chain:
#   Point SSLCertificateChainFile at a file containing the
#   concatenation of PEM encoded CA certificates which form the
#   certificate chain for the server certificate. Alternatively
#   the referenced file can be the same as SSLCertificateFile
#   when the CA certificates are directly appended to the server
#   certificate for convenience.
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt

#   Certificate Authority (CA):
#   Set the CA certificate verification path where to find CA
#   certificates for client authentication or alternatively one
#   huge file containing all of them (file must be PEM encoded)
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt

#   Client Authentication (Type):
#   Client certificate verification type and depth.  Types are
#   none, optional, require and optional_no_ca.  Depth is a
#   number which specifies how deeply to verify the certificate
#   issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth  10

#   Access Control:
#   With SSLRequire you can do per-directory access control based
#   on arbitrary complex boolean expressions containing server
#   variable checks and other lookup directives.  The syntax is a
#   mixture between C and Perl.  See the mod_ssl documentation
#   for more details.
#<Location />
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>

#   SSL Engine Options:
#   Set various options for the SSL engine.
#   o FakeBasicAuth:
#     Translate the client X.509 into a Basic Authorisation.  This means that
#     the standard Auth/DBMAuth methods can be used for access control.  The
#     user name is the `one line' version of the client's X.509 certificate.
#     Note that no password is obtained from the user. Every entry in the user
#     file needs this password: `xxj31ZMTZzkVA'.
#   o ExportCertData:
#     This exports two additional environment variables: SSL_CLIENT_CERT and
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
#     server (always existing) and the client (only existing when client
#     authentication is used). This can be used to import the certificates
#     into CGI scripts.
#   o StdEnvVars:
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
#     Per default this exportation is switched off for performance reasons,
#     because the extraction step is an expensive operation and is usually
#     useless for serving static content. So one usually enables the
#     exportation for CGI and SSI requests only.
#   o StrictRequire:
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
#     under a "Satisfy any" situation, i.e. when it applies access is denied
#     and no other module can change it.
#   o OptRenegotiate:
#     This enables optimized SSL connection renegotiation handling when SSL
#     directives are used in per-directory context. 
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/var/www/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

#   SSL Protocol Adjustments:
#   The safe and default but still SSL/TLS standard compliant shutdown
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
#   the close notify alert from client. When you need a different shutdown
#   approach you can use one of the following variables:
#   o ssl-unclean-shutdown:
#     This forces an unclean shutdown when the connection is closed, i.e. no
#     SSL close notify alert is sent or allowed to be received.  This violates
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
#     this when you receive I/O errors because of the standard approach where
#     mod_ssl sends the close notify alert.
#   o ssl-accurate-shutdown:
#     This forces an accurate shutdown when the connection is closed, i.e. a
#     SSL close notify alert is sent and mod_ssl waits for the close notify
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
#     practice often causes hanging connections with brain-dead browsers. Use
#     this only for browsers where you know that their SSL implementation
#     works correctly. 
#   Notice: Most problems of broken clients are also related to the HTTP
#   keep-alive facility, so you usually additionally want to disable
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
#   "force-response-1.0" for this.
BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

#   Per-Server Logging:
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
CustomLog logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

sudo cat /etc/httpd/sites-available/samtuke.com-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost 88.99.190.130:443>
    ServerName www.samtuke.com
    ServerAlias samtuke.com
    DocumentRoot /var/www/samtuke.com/public_html
<Directory "/var/www/samtuke.com">
	Options Indexes FollowSymLinks
	AllowOverride all
	Require all granted
</Directory>
    ErrorLog /var/www/samtuke.com/log/error.log
    CustomLog /var/www/samtuke.com/log/requests.log combined

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/www.samtuke.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.samtuke.com/privkey.pem
</VirtualHost>
</IfModule>

sudo cat /etc/httpd/sites-available/thinkingfree.org-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName thinkingfree.org
    ServerAlias www.thinkingfree.org
    DocumentRoot /var/www/thinkingfree.org/public_html
    ErrorLog /var/www/thinkingfree.org/log/error.log
    CustomLog /var/www/thinkingfree.org/log/requests.log combined

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/thinkingfree.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/thinkingfree.org/privkey.pem
</VirtualHost>
</IfModule>

sudo cat /etc/httpd/sites-enabled/samtuke.com.conf

<VirtualHost *:80>
    ServerName www.samtuke.com
    ServerAlias samtuke.com
    DocumentRoot /var/www/samtuke.com/public_html
<Directory "/var/www/samtuke.com">
	Options Indexes FollowSymLinks
	AllowOverride all
	Require all granted
</Directory>
    ErrorLog /var/www/samtuke.com/log/error.log
    CustomLog /var/www/samtuke.com/log/requests.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =samtuke.com [OR]
RewriteCond %{SERVER_NAME} =www.samtuke.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

sudo cat /etc/httpd/sites-enabled/thinkingfree.org.conf

<VirtualHost *:80>
    ServerName www.thinkingfree.org
    ServerAlias thinkingfree.org
    DocumentRoot /var/www/thinkingfree.org/public_html
    ErrorLog /var/www/thinkingfree.org/log/error.log
    CustomLog /var/www/thinkingfree.org/log/requests.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =thinkingfree.org [OR]
RewriteCond %{SERVER_NAME} =www.thinkingfree.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
1 Like

Can you please guide me or ask me if you want me to share any other log file?

1 Like

I'm digesting things now. This might take a bit...

No problem. Please take your time and thanks a lot in advance!

1 Like

What is the output of:

sudo cat /etc/httpd/conf/httpd.conf
[hafiznaseraslam@samtuke ~]$ sudo cat /etc/httpd/conf/httpd.conf
[sudo] password for hafiznaseraslam: 
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# See the httpd.conf(5) man page for more information on this configuration,
# and httpd.service(8) on using and configuring the httpd service.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Relax access to content within /var/www.
#
<Directory "/var/www">
    AllowOverride All
    # Allow open access:
    Require all granted
</Directory>

# Further relax access to the default document root:
<Directory "/var/www/html">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#
<Files ".ht*">
    Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    #CustomLog "logs/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    CustomLog "logs/access_log" combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

</IfModule>

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</IfModule>

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the 
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8

<IfModule mime_magic_module>
    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    MIMEMagicFile conf/magic
</IfModule>

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
IncludeOptional sites-enabled/*.conf
Include /etc/httpd/sites-available/samtuke.com-le-ssl.conf

# Stop timeout of wp duplicator plugin
Timeout 600
ProxyTimeout 600

Include /etc/httpd/sites-available/thinkingfree.org-le-ssl.conf

1 Like

It is strange how some files use /sites-enabled/ and some use /sites-available/.

1 Like

How can I change the configuration to read all the files only from one directory?

1 Like

Look for include statements within the main config file.
Place all your site configs in the /sites-available/ folder.
Enable and disable those configs using only the apache commands:
a2enconf
a2disconf

1 Like
  1. Remove the cruft.

a. Remove these two lines from httpd.conf:

Include /etc/httpd/sites-available/samtuke.com-le-ssl.conf
Include /etc/httpd/sites-available/thinkingfree.org-le-ssl.conf

b. Run these commands:

sudo rm /etc/httpd/sites-enabled/*
sudo rm /etc/httpd/sites-available/*
sudo certbot delete --cert-name www.samtuke.com
sudo certbot delete --cert-name thinkingfree.org
sudo certbot delete --cert-name thinkingfree.org-0001
  1. Install your clean configuration files.

a. Download these files:

samtuke.com.conf.txt (254 Bytes)

thinkingfree.org.conf.txt (279 Bytes)

b. Put them in /etc/httpd/sites-available

c. Run these commands:

sudo mv /etc/httpd/sites-available/samtuke.com.conf.txt /etc/httpd/sites-available/samtuke.com.conf
sudo mv /etc/httpd/sites-available/thinkingfree.org.conf.txt /etc/httpd/sites-available/thinkingfree.org.conf
sudo a2ensite samtuke.com.conf
sudo a2ensite thinkingfree.org.conf
  1. Reload Apache.
sudo apachectl -k graceful
  1. Acquire and install the correct certificates.
sudo certbot --apache -d "samtuke.com,www.samtuke.com"
sudo certbot --apache -d "thinkingfree.org,www.thinkingfree.org"
1 Like

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