WP Multisite install Let's Encrypt (Certbot) problem on GCP

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: Missionfinder.info

I ran this command: sudo certbot --apache or sudo certbot certonly –apache (i've tried both)

I followed this post (Setting up Letsencrypt for a single Wordpress Multisite installation with many domains? - #3 by tryhardandfails) to set up main and subsite .conf files in /etc/apache2/sites-available from the 000.default.conf file.

Example: for Journey subsite:

 <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

ServerName journey.missionfinder.info
ServerAdmin webmaster@domain.com
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
    # Add any other necessary settings for your main site
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
</VirtualHost>

It produced this output: Certbot ran successfully. However I could only access the MAIN page for the main site and each subsite. Any other pages resulted in a 404 error.

My web server is (include version): Software: Apache2 (2.4.38)

The operating system my web server runs on is (include version): Operating System: Debian(10.11)
My hosting provider, if applicable, is: Google Cloud Platform VM instance, single "click" install of WordPress (multisite)

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

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): Certbot Instructions | Certbot I don't know version of Certbot.

NOTE: Because of 404 errors I reinstalled the Website and stopped before running certbot. I believe the problem is in configuring the Main and Subsite .conf files. But it is unclear to me what different commands to use. - BB

As with all things "Apache", I would begin at the very beginning [and take nothing for granted].
Let's start with the output of:
sudo apachectl -t -D DUMP_VHOSTS

2 Likes

sudo apachectl -t -D DUMP_VHOSTS

VirtualHost configuration:

*:80                   is a NameVirtualHost
default server missionfinder-info-wordpress-multisite11-vm.us-west2-a.c.fleet-volt-265120.internal (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost missionfinder-info-wordpress-multisite11-vm.us-west2-a.c.fleet-volt-265120.internal (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost education.missionfinder.info (/etc/apache2/sites-enabled/education.missionfinder.info.conf:1)
port 80 namevhost it-technology.missionfinder.info (/etc/apache2/sites-enabled/it-technology.missionfinder.info.conf:1)
port 80 namevhost jg.missionfinder.info (/etc/apache2/sites-enabled/jg.missionfinder.info.conf:1)
port 80 namevhost journey.missionfinder.info (/etc/apache2/sites-enabled/journey.missionfinder.info.conf:1)
port 80 namevhost missionfinder.info (/etc/apache2/sites-enabled/missionfinder.info.conf:1)
        alias www.missionfinder.info
port 80 namevhost quickstart.missionfinder.info (/etc/apache2/sites-enabled/quickstart.missionfinder.info.conf:1)
port 80 namevhost short-term.missionfinder.info (/etc/apache2/sites-enabled/short-term.missionfinder.info.conf:1)

*:443 missionfinder-info-wordpress-multisite11-vm.us-west2-a.c.fleet-volt-265120.internal (/etc/apache2/sites-enabled/wordpress-https.conf:1)
1 Like

hmm...
What shows?:
certbot certificates

3 Likes

Certbot appeared to install correctly however only the main pages of each site (main and subsites) could be accessed without 404 errors.

3 Likes

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