Question

Cannot open my site with example.com (my domain), cannot renew my certification (timeout)

Posted January 3, 2021 345 views
ApacheWordPressLet's EncryptOpenLiteSpeed WordPress 1-Click

This is a followup on my previous question that I haven’t been able to solve https://www.digitalocean.com/community/questions/cannot-access-my-server-properly

https://check-your-website.server-daten.de/?q=178.62.111.79

https://imgur.com/a/7lQMpEt cert failure

000-default.conf

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        ServerName codeandchill.net
        ServerAlias www.codeandchill.net

        DocumentRoot /var/www/html

        <Directory /var/www/html/>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.codeandchill.net [OR]
RewriteCond %{SERVER_NAME} =codeandchill.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

I tried following the certbot but unfortunately I get a timeout for both domains (and I cannot access them), I cannot use codeandchill.net, but I have to use https://codeandchill.net

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
2 answers

Hello, @nikolamilovic

It seems like the site is taking too long to long. Have you tried restarting the Apache server? The server also might be running out of Apache workers to handle to requests and they simply build a queue and the request will be served when there is a free/spare worker to handle the process.

Regards,
Alex

  • Thank you, I’ve tried that just now. Same result unfortunately. The website isn’t accessed by anyone so the workers shouldn’t be a problem

    • You can examine the errot_log file

      /var/log/apache2/error.log for errors using a tool like tail or less.

      For example, to view the last two lines of the error log using tail, run the following command:

      sudo tail -n 2 /var/log/apache2/error.log
      
      

      You can also use tail to monitor the log in real time and then access your site and see if there is a logged error.

      sudo tail -f /var/log/apache2/error.log
      

      and then just access the site.

      You can also check for any references regarding the workers:

      grep -i workers /var/log/apache2/error.log
      

      Hope that this helps!
      Regards,
      Alex

      • Thank you very much for your efforts Alex, I tried that, no errors were logged

        [Mon Jan 04 06:25:06.227630 2021] [mpm_prefork:notice] [pid 15343] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1d configured -- resuming normal operations
        [Mon Jan 04 06:25:06.227690 2021] [core:notice] [pid 15343] AH00094: Command line: '/usr/sbin/apache2'
        [Mon Jan 04 10:47:18.357319 2021] [mpm_prefork:notice] [pid 15343] 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
        [Mon Jan 04 10:47:18.603689 2021] [mpm_prefork:notice] [pid 15343] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1d configured -- resuming normal operations
        [Mon Jan 04 10:47:18.603717 2021] [core:notice] [pid 15343] AH00094: Command line: '/usr/sbin/apache2'
        [Mon Jan 04 10:47:32.934901 2021] [mpm_prefork:notice] [pid 15343] 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
        [Mon Jan 04 10:47:33.066490 2021] [mpm_prefork:notice] [pid 15343] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1d configured -- resuming normal operations
        [Mon Jan 04 10:47:33.066525 2021] [core:notice] [pid 15343] AH00094: Command line: '/usr/sbin/apache2'
        

        I am not sure what is happening exactly, I may have set up the domains incorrectly or something?

        https://imgur.com/a/vhYp1g5

        • The DNS seems fine.

          You can double check if the files for the domain name are in the /var/www/html directory or in a sub-directory and if so you need to change the Document root to the full path of the website’s files, e.g

          DocumentRoot /var/www/htmlcodeandchill.net/public_html
          

          Regards,
          Alex

Hey, @nikolamilovic

Thanks for providing the screenshot. The WordPress installation is indeed hosted in the /var/www/html directory.

I wanted to double check this with you because the usual setup will include to have one additional directory in the /var/www/html which will have the have the domain name as the name of the folder and the site files will be hosted there.

Have you tried to execute strace in order to further troubleshoot the issue? It is a powerful command line tool for debugging and trouble shooting programs in Unix-like operating systems such as Linux. It captures and records all system calls made by a process and the signals received by the process. It displays the name of each system call together with its arguments enclosed in a parenthesis and its return value to standard error; you can optionally redirect it to a file as well.

You can navigate to /var/www/html the directory and execute.

strace -vvv -s 10000 php index.php

To write the trace messages sent to standard error to a file, use the -o option. This means that only the command output is printed on the screen as shown below.

strace -o debug.txt php index.php

To look through the file, use cat command.

For additional information, see the strace man page.

man strace

Regards,
Alex