Question

Getting 404 error after configuring SSL certificate

Posted October 26, 2021 144 views
NginxApacheSecurity

Hi,
I used apache2 to configure the SSL certificate.
After I completed configuring SSL from namecheap for my blog.
I cannot access wp-admin. Always return 404 error.
Please help me fix this error.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @phamthanhtamns,

Have you checked the apache log? By default it’s stored in /etc/apache2/error.log.

Usually offers important information about what is happening.

I hope you tell me something :)
Sergio Turpín

  • Hi Sergio,
    I encountered this message in the log

    [Tue Oct 26 00:00:08.243206 2021] [mpm_prefork:notice] [pid 138805] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 00:00:08.243244 2021] [core:notice] [pid 138805] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 02:08:36.119351 2021] [core:error] [pid 139322] [client 45.146.164.110:40414] AH00126: Invalid URI in request POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1
    [Tue Oct 26 07:43:32.010672 2021] [mpm_prefork:notice] [pid 138805] AH00169: caught SIGTERM, shutting down
    [Tue Oct 26 07:43:32.194046 2021] [mpm_prefork:notice] [pid 143975] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:43:32.194141 2021] [core:notice] [pid 143975] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 07:45:51.462382 2021] [mpm_prefork:notice] [pid 143975] AH00169: caught SIGTERM, shutting down
    [Tue Oct 26 07:45:51.634286 2021] [mpm_prefork:notice] [pid 144025] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:45:51.634356 2021] [core:notice] [pid 144025] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 07:48:03.497924 2021] [mpm_prefork:notice] [pid 144025] AH00171: Graceful restart requested, doing restart
    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
    [Tue Oct 26 07:48:03.633391 2021] [mpm_prefork:notice] [pid 144025] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:48:03.633409 2021] [core:notice] [pid 144025] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 07:48:20.138136 2021] [mpm_prefork:notice] [pid 144025] AH00171: Graceful restart requested, doing restart
    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
    [Tue Oct 26 07:48:20.250134 2021] [ssl:warn] [pid 144025] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
    [Tue Oct 26 07:48:20.250947 2021] [mpm_prefork:notice] [pid 144025] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:48:20.250959 2021] [core:notice] [pid 144025] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 07:49:43.182588 2021] [mpm_prefork:notice] [pid 144025] AH00171: Graceful restart requested, doing restart
    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
    [Tue Oct 26 07:49:43.293011 2021] [mpm_prefork:notice] [pid 144025] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:49:43.293031 2021] [core:notice] [pid 144025] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 07:49:58.344355 2021] [mpm_prefork:notice] [pid 144025] AH00171: Graceful restart requested, doing restart
    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
    [Tue Oct 26 07:49:58.424234 2021] [ssl:warn] [pid 144025] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
    [Tue Oct 26 07:49:58.424748 2021] [mpm_prefork:notice] [pid 144025] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:49:58.424755 2021] [core:notice] [pid 144025] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 07:51:50.396975 2021] [mpm_prefork:notice] [pid 144025] AH00171: Graceful restart requested, doing restart
    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
    [Tue Oct 26 07:51:50.550902 2021] [mpm_prefork:notice] [pid 144025] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:51:50.550933 2021] [core:notice] [pid 144025] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 07:56:11.611855 2021] [mpm_prefork:notice] [pid 144025] AH00169: caught SIGTERM, shutting down
    [Tue Oct 26 07:56:11.782359 2021] [mpm_prefork:notice] [pid 144325] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 07:56:11.782433 2021] [core:notice] [pid 144325] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 08:27:01.893472 2021] [mpm_prefork:notice] [pid 144325] AH00169: caught SIGTERM, shutting down
    [Tue Oct 26 08:27:02.147993 2021] [mpm_prefork:notice] [pid 144629] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 08:27:02.148085 2021] [core:notice] [pid 144629] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 08:29:12.762435 2021] [mpm_prefork:notice] [pid 144629] AH00169: caught SIGTERM, shutting down
    [Tue Oct 26 08:29:12.937547 2021] [mpm_prefork:notice] [pid 144675] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 08:29:12.937633 2021] [core:notice] [pid 144675] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 09:39:07.963462 2021] [mpm_prefork:notice] [pid 144675] AH00169: caught SIGTERM, shutting down
    [Tue Oct 26 09:39:08.115723 2021] [mpm_prefork:notice] [pid 145660] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 09:39:08.115797 2021] [core:notice] [pid 145660] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 09:43:57.327836 2021] [mpm_prefork:notice] [pid 145660] AH00171: Graceful restart requested, doing restart
    [Tue Oct 26 09:43:57.442754 2021] [mpm_prefork:notice] [pid 145660] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 09:43:57.442770 2021] [core:notice] [pid 145660] AH00094: Command line: ’/usr/sbin/apache2’
    [Tue Oct 26 09:53:15.126910 2021] [mpm_prefork:notice] [pid 145660] AH00169: caught SIGTERM, shutting down
    [Tue Oct 26 09:53:15.290472 2021] [mpm_prefork:notice] [pid 145796] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured – resuming normal operations
    [Tue Oct 26 09:53:15.290547 2021] [core:notice] [pid 145796] AH00094: Command line: ’/usr/sbin/apache2’

  • I got these errors in the log, I posted but not approved in this comment:
    AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured
    AH00094: Command line: ’/usr/sbin/apache2’
    AH00126: Invalid URI in request POST

    • Are you using proxy?

      I don’t know what your SSL configuration is, but I recommend you to check How to secure apache with let’s encrypt

      Hope helps you,
      Sergio Turpín

      by Erika Heidi
      Let's Encrypt is a Certificate Authority (CA) that facilitates obtaining and installing free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. Currently, the entire process of obtaining and installing a certificate is fully automated on both Apache and Nginx with the use of Certbot. In this guide, we'll use Certbot to obtain a free SSL certificate for Apache on Ubuntu 20.04, and make sure this certificate is set up to renew automatically.