Website refused to connect after certificate and bot reinstallation

Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Secure Connections (SSL/HTTPS)

bndiagnostic ID: 312f7167-c9f1-78db-0bcf-8373dba763bf

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
Wanted to renew letsencrypt certificate, but it showed up error as the files were missing. After looking for various solution on this forum, it turned out to be broken certbot as folders like live an other were missing in directory. Hence removed and reinstalled the bot and certificates. Everything added up perfectly as directed, but still ended up with ERR_SSL_PROTOCOL_ERROR. Modified Apache files and checked for bitnami.conf and httpd.conf . bitnami.conf seems weird as it does not contain any certificate info. No modifications were made in httpd.conf. Bitnami diagnostic tool shows following error detected.
[Apache Error log]
[core:error] [pid 7591:tid 139858471208704]
[client ip_address:37476] AH10244: invalid URI path
(/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/hosts)

[core:error] [pid 17609:tid 139858311747328]
[client ip_address:50658] AH10244: invalid URI path
(/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)

[Apache configuration error]
httpd: Syntax error on line 523 of /opt/bitnami/apache2/conf/httpd.conf: Syntax
error on line 7 of /opt/bitnami/apache/conf/bitnami/bitnami.conf: Expected
but saw

[bitnami.conf]

Default Virtual Host configuration.

DocumentRoot "/opt/bitnami/apache/htdocs" #RewriteEngine On #RewriteCond %{HTTPS} !=on #RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L] # Error Documents ErrorDocument 503 /503.html # BEGIN: Support domain renewal when using mod_proxy within Loca tion ProxyPass ! # END: Support domain renewal when using mod_proxy within Locati on # Include "/opt/bitnami/apache/conf/bitnami/bitnami-ssl.config # # (commented the modifications made on line 6,7,8)

[Apache Error log]

[core:error] [pid 7591:tid 139858471208704] 
[client **ip_address**:37476] AH10244: invalid URI path 
(/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/hosts)

[core:error] [pid 17609:tid 139858311747328] 
[client **ip_address**:50658] AH10244: invalid URI path 
(/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh)

[Apache configuration error]

httpd: Syntax error on line 523 of /opt/bitnami/apache2/conf/httpd.conf: Syntax 
error on line 7 of /opt/bitnami/apache/conf/bitnami/bitnami.conf: Expected 
</VirtualHost> but saw </Directory>

Please check the configuration.

[bitnami.conf]

# Default Virtual Host configuration.
<VirtualHost _default_:80>
DocumentRoot "/opt/bitnami/apache/htdocs"
#RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L] 
</Directory>
  # Error Documents
  ErrorDocument 503 /503.html
  # BEGIN: Support domain renewal when using mod_proxy within Loca
tion
  <Location /.well-known>
    <IfModule mod_proxy.c>
      ProxyPass !
    </IfModule>
  </Location>
  # END: Support domain renewal when using mod_proxy within Locati
on
</VirtualHost>
# Include "/opt/bitnami/apache/conf/bitnami/bitnami-ssl.config
#

(commented the modifications made on line 6,7,8)

Current website status: ERR_CONNECTION_REFUSED

Issue resolved. Please close this thread.

I’m glad to hear you managed to solve the issue. As Apache showed in the log file, you had an extra </Directory> line in the configuration file and you needed to remove it or update it with the proper <Directory> block.

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