I'm using Certbot to install SSL on my WordPress deployment on Google Cloud (Click to Deploy), but I am getting an error message when testing if Certbot can be run

Hi there,

I'm looking to install Certbot for my Wordpress on Google Cloud (click to deploy)

I followed the instructions laid out at:

Everything seemed to be going fine until Step 6 where I ran the command to test if certbot can be run.

sudo ln -s /snap/bin/certbot /usr/bin/certbot

The response I got was:
ln: failed to create symbolic link '/usr/bin/certbot': File exists

Can anybody tell me what's going on / what I can do to complete the installation?

Thanks so much!
James

Here is my info:


Domain: lbadvisors.us

I ran this command: sudo ln -s /snap/bin/certbot /usr/bin/certbot

It produced this output: ln: failed to create symbolic link '/usr/bin/certbot': File exists

My web server is (include version): Not sure how I get this...

The operating system my web server runs on is (include version): Debian 10

My hosting provider, if applicable, is: Google Cloud

I can login to a root shell on my machine (yes or no, or I don't know): I don't know

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.24.0

1 Like

Welcome to the Let's Encrypt Community, James :slightly_smiling_face:

It likely means that you already have an existing version of certbot installed at:

/usr/bin/certbot

What are the outputs of:

sudo /usr/bin/certbot --version

sudo /snap/bin/certbot --version

2 Likes

And perhaps also useful is the command:

ls -l /usr/bin/certbot

3 Likes

Thanks Griffin! I appreciate it.

The outputs are:

sudo /usr/bin/certbot --version
certbot 1.24.0

sudo /snap/bin/certbot --version
certbot 1.24.0

2 Likes

Hi Osiris,

The result I got was:
lrwxrwxrwx 1 root root 17 Mar 14 18:57 /usr/bin/certbot -> /snap/bin/certbot

1 Like

Then you can "skip" that installation step (as it is already as desired).

2 Likes

Thanks rg305. Ok so I moved forward with the next step and this is what the result was:

admin@lbadvisors-vm:~$ sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): lbadvisors.us www.lbadvisors.us
Requesting a certificate for lbadvisors.us and www.lbadvisors.us
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these probl
ems:
Domain: www.lbadvisors.us
Type: unauthorized
Detail: Invalid response from http://www.lbadvisors.us/.well-known/acme-challenge/ip-9k1L87-l8mE83hGGzjt0akn-CoMr
xfHZr2w9cX5g [67.195.197.24]: 400
Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure
that the listed domains point to this Apache server and that it is accessible from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/let
sencrypt.log or re-run Certbot with -v for more details.

1 Like

you shoud check the apache access logs to see why it triggers a 400 error (check the config and the .htaccess, check if they block access to files starting with a dot)

1 Like

I don't quite know how to check for that in the htaccess and wp-config files... Is there any guidance you can provide?

doing that is easier than explaining it.

look for any block matching filenames starting with a dot in /etc/apache2

2 Likes

Ok. There were no files beginning with a dot in /etc/apache2.

What are the outputs of these commands:

sudo apachectl -S
sudo ls -lRa /etc/apache2

Please put three backticks above and below each of the outputs, like this:

```
output
```

2 Likes

Hi Griffin,

The first one is:

sudo apachectl -S
VirtualHost configuration:
*:80                   lbadvisors-vm.us-west1-a.c.root-lotus-343001.internal (/etc/apache2/sites-enabled/000-defaul
t.conf:1)
*:443                  lbadvisors-vm.us-west1-a.c.root-lotus-343001.internal (/etc/apache2/sites-enabled/wordpress-
https.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default 
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33

The second one is:

sudo ls -lRa /etc/apache
ls: cannot access '/etc/apache': No such file or directory
1 Like

Can you show result of this then:

sudo ls -lRa /etc/apache2
3 Likes

Yep. That's my bad.

2 Likes

No VirtualHosts configured with ServerName/ServerAlias directives pointing to lbadvisors.us/www.lbadvisors.us?

3 Likes

Sure, its:

/etc/apache2:
total 88
drwxr-xr-x  8 root root  4096 Mar 14 21:34 .
drwxr-xr-x 77 root root  4096 Mar 15 16:39 ..
-rw-r--r--  1 root root  7224 Dec 21 16:50 apache2.conf
drwxr-xr-x  2 root root  4096 Feb 20 16:54 conf-available
drwxr-xr-x  2 root root  4096 Feb 20 16:54 conf-enabled
-rw-r--r--  1 root root  1782 Aug  8  2020 envvars
-rw-r--r--  1 root root 31063 Aug  8  2020 magic
drwxr-xr-x  2 root root 12288 Feb 20 16:54 mods-available
drwxr-xr-x  2 root root  4096 Feb 20 16:54 mods-enabled
-rw-r--r--  1 root root   320 Aug  8  2020 ports.conf
drwxr-xr-x  2 root root  4096 Mar 14 21:34 sites-available
drwxr-xr-x  2 root root  4096 Mar  3 02:05 sites-enabled
/etc/apache2/conf-available:
total 36
drwxr-xr-x 2 root root 4096 Feb 20 16:54 .
drwxr-xr-x 8 root root 4096 Mar 14 21:34 ..
-rw-r--r-- 1 root root  315 Aug  8  2020 charset.conf
-rw-r--r-- 1 root root 3224 Aug  8  2020 localized-error-pages.conf
-rw-r--r-- 1 root root  189 Aug  8  2020 other-vhosts-access-log.conf
-rw-r--r-- 1 root root 1139 Feb 17 16:16 php7.4-cgi.conf
-rw-r--r-- 1 root root 1278 Feb 17 16:16 php7.4-fpm.conf
-rw-r--r-- 1 root root 2177 Feb 20 16:54 security.conf
-rw-r--r-- 1 root root  455 Aug  8  2020 serve-cgi-bin.conf
/etc/apache2/conf-enabled:
total 8
drwxr-xr-x 2 root root 4096 Feb 20 16:54 .
drwxr-xr-x 8 root root 4096 Mar 14 21:34 ..
lrwxrwxrwx 1 root root   30 Feb 20 16:54 charset.conf -> ../conf-available/charset.conf
lrwxrwxrwx 1 root root   44 Feb 20 16:54 localized-error-pages.conf -> ../conf-available/localized-error-pages.conf
lrwxrwxrwx 1 root root   46 Feb 20 16:54 other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.
conf
lrwxrwxrwx 1 root root   33 Feb 20 16:54 php7.4-fpm.conf -> ../conf-available/php7.4-fpm.conf
lrwxrwxrwx 1 root root   31 Feb 20 16:54 security.conf -> ../conf-available/security.conf
lrwxrwxrwx 1 root root   36 Feb 20 16:54 serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf
/etc/apache2/mods-available:
total 588
drwxr-xr-x 2 root root 12288 Feb 20 16:54 .
drwxr-xr-x 8 root root  4096 Mar 14 21:34 ..
-rw-r--r-- 1 root root   100 Aug  8  2020 access_compat.load
-rw-r--r-- 1 root root   377 Aug  8  2020 actions.conf
-rw-r--r-- 1 root root    66 Aug  8  2020 actions.load
-rw-r--r-- 1 root root   843 Aug  8  2020 alias.conf
-rw-r--r-- 1 root root    62 Aug  8  2020 alias.load
-rw-r--r-- 1 root root    76 Aug  8  2020 allowmethods.load
-rw-r--r-- 1 root root    76 Aug  8  2020 asis.load
-rw-r--r-- 1 root root    94 Aug  8  2020 auth_basic.load
-rw-r--r-- 1 root root    96 Aug  8  2020 auth_digest.load
-rw-r--r-- 1 root root   100 Aug  8  2020 auth_form.load
-rw-r--r-- 1 root root    72 Aug  8  2020 authn_anon.load
-rw-r--r-- 1 root root    72 Aug  8  2020 authn_core.load
-rw-r--r-- 1 root root    85 Aug  8  2020 authn_dbd.load
-rw-r--r-- 1 root root    70 Aug  8  2020 authn_dbm.load
-rw-r--r-- 1 root root    72 Aug  8  2020 authn_file.load
-rw-r--r-- 1 root root    78 Aug  8  2020 authn_socache.load
-rw-r--r-- 1 root root    74 Aug  8  2020 authnz_fcgi.load
-rw-r--r-- 1 root root    90 Aug  8  2020 authnz_ldap.load
-rw-r--r-- 1 root root    72 Aug  8  2020 authz_core.load
-rw-r--r-- 1 root root    96 Aug  8  2020 authz_dbd.load
-rw-r--r-- 1 root root    92 Aug  8  2020 authz_dbm.load
-rw-r--r-- 1 root root   104 Aug  8  2020 authz_groupfile.load
-rw-r--r-- 1 root root    94 Aug  8  2020 authz_host.load
-rw-r--r-- 1 root root    74 Aug  8  2020 authz_owner.load
-rw-r--r-- 1 root root    94 Aug  8  2020 authz_user.load
-rw-r--r-- 1 root root  3374 Aug  8  2020 autoindex.conf
-rw-r--r-- 1 root root    70 Aug  8  2020 autoindex.load
-rw-r--r-- 1 root root    64 Sep  1  2020 brotli.load
-rw-r--r-- 1 root root    64 Aug  8  2020 buffer.load
-rw-r--r-- 1 root root    62 Aug  8  2020 cache.load
-rw-r--r-- 1 root root   889 Aug  8  2020 cache_disk.conf
-rw-r--r-- 1 root root    89 Aug  8  2020 cache_disk.load
-rw-r--r-- 1 root root    95 Aug  8  2020 cache_socache.load
-rw-r--r-- 1 root root    70 Aug  8  2020 cern_meta.load
-rw-r--r-- 1 root root    58 Aug  8  2020 cgi.load
-rw-r--r-- 1 root root   115 Aug  8  2020 cgid.conf
-rw-r--r-- 1 root root    60 Aug  8  2020 cgid.load
-rw-r--r-- 1 root root    76 Aug  8  2020 charset_lite.load
-rw-r--r-- 1 root root    60 Aug  8  2020 data.load
-rw-r--r-- 1 root root    58 Dec 21 05:29 dav.load
-rw-r--r-- 1 root root    83 Aug  8  2020 dav_fs.conf
-rw-r--r-- 1 root root    79 Aug  8  2020 dav_fs.load
-rw-r--r-- 1 root root    68 Aug  8  2020 dav_lock.load
-rw-r--r-- 1 root root    58 Aug  8  2020 dbd.load
-rw-r--r-- 1 root root   395 Dec 21 05:29 deflate.conf
-rw-r--r-- 1 root root    84 Aug  8  2020 deflate.load
-rw-r--r-- 1 root root    64 Aug  8  2020 dialup.load
-rw-r--r-- 1 root root   157 Aug  8  2020 dir.conf
-rw-r--r-- 1 root root    58 Aug  8  2020 dir.load
-rw-r--r-- 1 root root    64 Aug  8  2020 dump_io.load
-rw-r--r-- 1 root root    60 Aug  8  2020 echo.load
-rw-r--r-- 1 root root    58 Aug  8  2020 env.load
-rw-r--r-- 1 root root    66 Aug  8  2020 expires.load
-rw-r--r-- 1 root root    72 Aug  8  2020 ext_filter.load
-rw-r--r-- 1 root root    89 Aug  8  2020 file_cache.load
-rw-r--r-- 1 root root    64 Aug  8  2020 filter.load
-rw-r--r-- 1 root root    66 Aug  8  2020 headers.load
-rw-r--r-- 1 root root   176 Aug  8  2020 heartbeat.load
-rw-r--r-- 1 root root   182 Aug  8  2020 heartmonitor.load
-rw-r--r-- 1 root root  1240 Sep  1  2020 http2.conf
-rw-r--r-- 1 root root    62 Aug  8  2020 http2.load
-rw-r--r-- 1 root root    62 Aug  8  2020 ident.load
-rw-r--r-- 1 root root    68 Aug  8  2020 imagemap.load
-rw-r--r-- 1 root root    82 Aug  8  2020 include.load
-rw-r--r-- 1 root root   402 Aug  8  2020 info.conf
-rw-r--r-- 1 root root    60 Aug  8  2020 info.load
-rw-r--r-- 1 root root   116 Aug  8  2020 lbmethod_bybusyness.load
-rw-r--r-- 1 root root   116 Aug  8  2020 lbmethod_byrequests.load
-rw-r--r-- 1 root root   114 Aug  8  2020 lbmethod_bytraffic.load
-rw-r--r-- 1 root root   114 Aug  8  2020 lbmethod_heartbeat.load
-rw-r--r-- 1 root root   121 Aug  8  2020 ldap.conf
-rw-r--r-- 1 root root    60 Aug  8  2020 ldap.load
-rw-r--r-- 1 root root    70 Aug  8  2020 log_debug.load
-rw-r--r-- 1 root root    76 Aug  8  2020 log_forensic.load
-rw-r--r-- 1 root root    58 Aug  8  2020 lua.load
-rw-r--r-- 1 root root    62 Aug  8  2020 macro.load
-rw-r--r-- 1 root root    56 Sep  1  2020 md.load
-rw-r--r-- 1 root root  7676 Dec 21 05:29 mime.conf
-rw-r--r-- 1 root root    60 Aug  8  2020 mime.load
-rw-r--r-- 1 root root   120 Aug  8  2020 mime_magic.conf
-rw-r--r-- 1 root root    72 Aug  8  2020 mime_magic.load
-rw-r--r-- 1 root root   668 Aug  8  2020 mpm_event.conf
-rw-r--r-- 1 root root   106 Aug  8  2020 mpm_event.load
-rw-r--r-- 1 root root   571 Aug  8  2020 mpm_prefork.conf
-rw-r--r-- 1 root root   108 Aug  8  2020 mpm_prefork.load
-rw-r--r-- 1 root root   836 Aug  8  2020 mpm_worker.conf
-rw-r--r-- 1 root root   107 Aug  8  2020 mpm_worker.load
-rw-r--r-- 1 root root   724 Aug  8  2020 negotiation.conf
-rw-r--r-- 1 root root    74 Aug  8  2020 negotiation.load
-rw-r--r-- 1 root root   855 Feb 17 16:16 php7.4.conf
-rw-r--r-- 1 root root   102 Feb 17 16:16 php7.4.load
-rw-r--r-- 1 root root   822 Aug  8  2020 proxy.conf
-rw-r--r-- 1 root root    62 Aug  8  2020 proxy.load
-rw-r--r-- 1 root root    87 Aug  8  2020 proxy_ajp.load
-rw-r--r-- 1 root root   347 Aug  8  2020 proxy_balancer.conf
-rw-r--r-- 1 root root   115 Aug  8  2020 proxy_balancer.load
-rw-r--r-- 1 root root    95 Aug  8  2020 proxy_connect.load
-rw-r--r-- 1 root root    95 Aug  8  2020 proxy_express.load
-rw-r--r-- 1 root root    89 Aug  8  2020 proxy_fcgi.load
-rw-r--r-- 1 root root    93 Aug  8  2020 proxy_fdpass.load
-rw-r--r-- 1 root root   189 Aug  8  2020 proxy_ftp.conf
-rw-r--r-- 1 root root    87 Aug  8  2020 proxy_ftp.load
-rw-r--r-- 1 root root    93 Aug  8  2020 proxy_hcheck.load
-rw-r--r-- 1 root root  2511 Aug  8  2020 proxy_html.conf
-rw-r--r-- 1 root root    97 Aug  8  2020 proxy_html.load
-rw-r--r-- 1 root root    89 Aug  8  2020 proxy_http.load
-rw-r--r-- 1 root root    97 Aug  8  2020 proxy_http2.load
-rw-r--r-- 1 root root    89 Aug  8  2020 proxy_scgi.load
-rw-r--r-- 1 root root    91 Sep  1  2020 proxy_uwsgi.load
-rw-r--r-- 1 root root    97 Aug  8  2020 proxy_wstunnel.load
-rw-r--r-- 1 root root    85 Aug  8  2020 ratelimit.load
-rw-r--r-- 1 root root    70 Aug  8  2020 reflector.load
-rw-r--r-- 1 root root    68 Aug  8  2020 remoteip.load
-rw-r--r-- 1 root root  1190 Aug  8  2020 reqtimeout.conf
-rw-r--r-- 1 root root    72 Aug  8  2020 reqtimeout.load
-rw-r--r-- 1 root root    66 Aug  8  2020 request.load
-rw-r--r-- 1 root root    66 Aug  8  2020 rewrite.load
-rw-r--r-- 1 root root    58 Aug  8  2020 sed.load
-rw-r--r-- 1 root root    66 Aug  8  2020 session.load
-rw-r--r-- 1 root root    99 Aug  8  2020 session_cookie.load
-rw-r--r-- 1 root root    99 Aug  8  2020 session_crypto.load
-rw-r--r-- 1 root root    93 Aug  8  2020 session_dbd.load
-rw-r--r-- 1 root root  1280 Aug  8  2020 setenvif.conf
-rw-r--r-- 1 root root    68 Aug  8  2020 setenvif.load
-rw-r--r-- 1 root root    78 Aug  8  2020 slotmem_plain.load
-rw-r--r-- 1 root root    74 Aug  8  2020 slotmem_shm.load
-rw-r--r-- 1 root root    74 Aug  8  2020 socache_dbm.load
-rw-r--r-- 1 root root    84 Aug  8  2020 socache_memcache.load
-rw-r--r-- 1 root root    78 Aug  8  2020 socache_shmcb.load
-rw-r--r-- 1 root root    66 Aug  8  2020 speling.load
-rw-r--r-- 1 root root  3110 Aug  8  2020 ssl.conf
-rw-r--r-- 1 root root    97 Aug  8  2020 ssl.load
-rw-r--r-- 1 root root   749 Aug  8  2020 status.conf
-rw-r--r-- 1 root root    64 Aug  8  2020 status.load
-rw-r--r-- 1 root root    72 Aug  8  2020 substitute.load
-rw-r--r-- 1 root root    64 Aug  8  2020 suexec.load
-rw-r--r-- 1 root root    70 Aug  8  2020 unique_id.load
-rw-r--r-- 1 root root   324 Aug  8  2020 userdir.conf
-rw-r--r-- 1 root root    66 Aug  8  2020 userdir.load
-rw-r--r-- 1 root root    70 Aug  8  2020 usertrack.load
-rw-r--r-- 1 root root    74 Aug  8  2020 vhost_alias.load
-rw-r--r-- 1 root root    66 Aug  8  2020 xml2enc.load
/etc/apache2/mods-enabled:
total 8
drwxr-xr-x 2 root root 4096 Feb 20 16:54 .
drwxr-xr-x 8 root root 4096 Mar 14 21:34 ..
lrwxrwxrwx 1 root root   36 Feb 20 16:54 access_compat.load -> ../mods-available/access_compat.load
lrwxrwxrwx 1 root root   28 Feb 20 16:54 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root   28 Feb 20 16:54 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 authn_core.load -> ../mods-available/authn_core.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 authz_core.load -> ../mods-available/authz_core.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root   32 Feb 20 16:54 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root   32 Feb 20 16:54 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root   30 Feb 20 16:54 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root   30 Feb 20 16:54 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root   26 Feb 20 16:54 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root   26 Feb 20 16:54 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root   26 Feb 20 16:54 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root   29 Feb 20 16:54 filter.load -> ../mods-available/filter.load
lrwxrwxrwx 1 root root   27 Feb 20 16:54 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root   27 Feb 20 16:54 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root   34 Feb 20 16:54 mpm_prefork.conf -> ../mods-available/mpm_prefork.conf
lrwxrwxrwx 1 root root   34 Feb 20 16:54 mpm_prefork.load -> ../mods-available/mpm_prefork.load
lrwxrwxrwx 1 root root   34 Feb 20 16:54 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root   34 Feb 20 16:54 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root   29 Feb 20 16:54 php7.4.conf -> ../mods-available/php7.4.conf
lrwxrwxrwx 1 root root   29 Feb 20 16:54 php7.4.load -> ../mods-available/php7.4.load
lrwxrwxrwx 1 root root   28 Feb 20 16:54 proxy.conf -> ../mods-available/proxy.conf
lrwxrwxrwx 1 root root   28 Feb 20 16:54 proxy.load -> ../mods-available/proxy.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 proxy_fcgi.load -> ../mods-available/proxy_fcgi.load
lrwxrwxrwx 1 root root   33 Feb 20 16:54 reqtimeout.conf -> ../mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root   33 Feb 20 16:54 reqtimeout.load -> ../mods-available/reqtimeout.load
lrwxrwxrwx 1 root root   30 Feb 20 16:54 rewrite.load -> ../mods-available/rewrite.load
lrwxrwxrwx 1 root root   31 Feb 20 16:54 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root   31 Feb 20 16:54 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root   36 Feb 20 16:54 socache_shmcb.load -> ../mods-available/socache_shmcb.load
lrwxrwxrwx 1 root root   26 Feb 20 16:54 ssl.conf -> ../mods-available/ssl.conf
lrwxrwxrwx 1 root root   26 Feb 20 16:54 ssl.load -> ../mods-available/ssl.load
lrwxrwxrwx 1 root root   29 Feb 20 16:54 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root   29 Feb 20 16:54 status.load -> ../mods-available/status.load
/etc/apache2/sites-available:
total 28
drwxr-xr-x 2 root root 4096 Mar 14 21:34 .
drwxr-xr-x 8 root root 4096 Mar 14 21:34 ..
-rw-r--r-- 1 root root 1332 Aug  8  2020 000-default.conf
-rw-r--r-- 1 root root 6338 Aug  8  2020 default-ssl.conf
-rw-r--r-- 1 root root   82 Feb 20 16:54 wordpress-http.conf
-rw-r--r-- 1 root root  350 Feb 20 16:54 wordpress-https.conf
/etc/apache2/sites-enabled:
total 8
drwxr-xr-x 2 root root 4096 Mar  3 02:05 .
drwxr-xr-x 8 root root 4096 Mar 14 21:34 ..
lrwxrwxrwx 1 root root   35 Feb 20 16:54 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root   39 Mar  3 02:05 wordpress-https.conf -> ../sites-available/wordpress-https.conf










1 Like

show us these files.

2 Likes

Ok- here they are

000-default.conf

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

wordpress-https.conf

<VirtualHost *:443>
  ServerAdmin admin@example.com
  DocumentRoot /var/www/html
  SSLEngine on
  SSLCertificateFile /etc/ssl/certs/c2d-temporary-self-signed-cert.pem
  SSLCertificateKeyFile /etc/ssl/private/c2d-temporary-self-signed-cert.key

  <Directory /var/www/html>
    Options -Indexes
    AllowOverride FileInfo
  </Directory>
</VirtualHost>

apache2.conf

# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#Mutex file:${APACHE_LOCK_DIR} default

#
# The directory where shm and other runtime files will be stored.
#

DefaultRuntimeDir ${APACHE_RUN_DIR}

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# 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 ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

#<Directory /srv/>
#	Options Indexes FollowSymLinks
#	AllowOverride None
#	Require all granted
#</Directory>




# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

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


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

1 Like

check /var/log/apache2/{access,error}.log and tell me what it says about http 400 errors.

2 Likes