Now what did I do wrong?

What other steps do i need? I have read a lot of posts and no joy.

Ubuntu 20.04 updated

1 Like

Welcome Back to the Let's Encrypt Community :slightly_smiling_face:

I think your Apache may be horribly borked.

What says this:

sudo apachectl -S


Certificate History

https://crt.sh/?Identity=hardcoregames.ga&deduplicate=Y

1 Like

All I have done to Apache was enable module rewrite so it would load wordpress which is what I am self hosting


AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80                   127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: 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
1 Like

Please add 3 backticks ``` on a line by themselves above and below each requested item.

What are the outputs of these commands?

sudo ls -lRa /etc/apache2/sites-available

sudo ls -lRa /etc/apache2/sites-enabled

What are the contents of this file?

/etc/apache2/sites-enabled/000-default.conf

1 Like
total 24
drwxr-xr-x 2 root root 4096 Jan 30 00:17 .
drwxr-xr-x 8 root root 4096 Jan 30 00:17 ..
-rw-r--r-- 1 root root 1466 Jan 29 23:15 000-default.conf
-rw-r--r-- 1 root root 1319 Jan 29 23:49 000-default-le-ssl.conf
-rw-r--r-- 1 root root 6338 Jul 16  2019 default-ssl.conf

total 8
drwxr-xr-x 2 root root 4096 Jan 29 23:54 .
drwxr-xr-x 8 root root 4096 Jan 30 00:17 ..
lrwxrwxrwx 1 root root   35 Jan 25 22:34 000-default.conf -> ../sites-available/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
RewriteEngine on
RewriteCond %{SERVER_NAME} =hardcoregames.ga
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
1 Like

Can you edit your post and add the backticks, please? The configuration is cutoff without them.

```
output
```

1 Like

I did that with each part but the output files have their own peculiarities

1 Like

No worries. :slightly_smiling_face:

What are the contents of this file?

/etc/apache2/sites-available/000-default-le-ssl.conf

Here's the plan:

  1. Delete this:

/etc/apache2/sites-available/000-default-le-ssl.conf

  1. Replace the entire contents of /etc/apache2/sites-enabled/000-default.conf with this:
<VirtualHost *:80>
ServerName www.hardcoregames.ga
ServerAlias hardcoregames.ga
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
${APACHE_LOG_DIR}/error.log CustomLog
${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
  1. Run this:

sudo apachectl -k graceful

  1. Run this:

sudo certbot --apache -d "hardcoregames.ga,www.hardcoregames.ga"


I have to run now, but I can all but guarantee this will solve everything. :wink:

1 Like

sudo apachectl -k graceful

syntax error in line 6 so i # them out to see if it would work otherwise

that seems to have cured the problem

so now I am not sure if certbot is on the cron payroll or not

1 Like

probably just a typo

1 Like

I guess I can append ftp.hardcoregames.ga for using a ftp client

Once i get everything figured out I was thinking of mechanizing the setup using bash or whatever to automate the process

eventually i will mv my site into /var/www/hardcoregames.ga so I can run multiple sites

everything needs to be mechanized so its efficient

If you get time you should also check out whether you can run your site using caddy instead of apache, it has https renewals etc built in.

2 Likes

I prefer to run out of the box and go from there as it is a safe bet for most who have travelled down the same path as me

this way its reproducible

2 Likes

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