bitnami / vms

Bitnami VMs
https://bitnami.com
Other
200 stars 44 forks source link

[Wordpress] Wordpress not loading in browser. ERR_CONNECTION_REFUSED. AWS Lightsail #1476

Closed 84studios closed 2 months ago

84studios commented 3 months ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

dfe51a90-cb71-0779-ae77-3fcea9ee8e12

bndiagnostic output

✓ Resources: No issues found ? Connectivity: Found possible issues ✓ Mariadb: No issues found ✓ Processes: No issues found ✓ Wordpress: No issues found ? Apache: Found possible issues ✓ Php: No issues found

[Connectivity]

Server ports 22, 80 and/or 443 are not publicly accessible. Please check the following guide to open server ports for remote access:

https://docs.bitnami.com/general/faq/administration/use-firewall/

[Apache]

Press [Enter] to continue: The Apache configuration has errors:

httpd: Syntax error on line 518 of /opt/bitnami/apache2/conf/httpd.conf: Syntax 
error on line 55 of /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf: 
Expected </Files> but saw </IfModule>

Please check the configuration.

bndiagnostic was not useful. Could you please tell us why?

Server ports 22, 80, and 443 are confirmed to be open via Lightsail's dashboard, but port 80 and 443 are not when checked in SSH. I also dont know what the correct Apache syntax errors should be.

Describe your issue as much as you can

Lightsail instance http://18.116.15.255/ is not loading the Wordpress website that has been running on this server. Browser gives the ERR_CONNECTION_REFUSED. Through AWS Support, they confirmed that the server is not listening on port 80 and 443. After some more research, it was found that Apache server and Bitnami services are not running and I'm unable to restart it either of them.

The status of the Apache server gives me this message: Cannot find any running daemon to contact. If it is running, make sure you are pointing to the right pid file (/var/run/gonit.pid)

I currently have a backup of the full website running on another server for the time being just so that we keep our online presence (iplaylikeagirl.org). But its a 2 month old backup so content is outdated. I had to reboot the server on March 28 because of some plugin maintenance and it never came back up. Any help will be great. Link below is to some log files.

https://www.dropbox.com/scl/fo/hx6pi75cjd48cebf9scl0/h?rlkey=u1j7yyssi9jm3wjxv53xntgvb&dl=0

jotamartos commented 2 months ago

Hi @84studios,

It seems you modified the Apache's configuration and the changes you implemented are wrong. The support tool warned you about this

The Apache configuration has errors:

httpd: Syntax error on line 518 of /opt/bitnami/apache2/conf/httpd.conf: Syntax 
error on line 55 of /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf: 
Expected </Files> but saw </IfModule>

Please review the changes in the /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf file and ensure the syntax is correct. You can compare the file with the backup you have if necessary.

84studios commented 2 months ago

Hello @jotamartos . Thank you, but can you provide me with what the correct syntax should be? I'm not too well versed on the server side so I don't even know when or how this syntax language was changed. I never touch any of the files out of the Wordpress folder. Lin 55 has a commented-out syntax of "# Dynamic Shared Object (DSO) Support".

jotamartos commented 2 months ago

Hi @84studios,

I'm sorry but we do not provide this kind of support. If you need help when updating the Apache's configuration, we suggest you review the official documentation or find someone in your community who can help you with the changes.

Regarding the error, I can see both wordpress-vhost.conf and wordpress-https-vhost.conf files have this block at the end

  # END: Support domain renewal when using mod_proxy within Location
#Hide .user.ini file from being served by server
<Files ".user.ini"> </VirtualHost> <IfModule mod_authz_core.c> Require all denied
</IfModule> <IfModule !mod_authz_core.c> Order deny,allow Deny from all
</IfModule>
</Files>
#END: Hid .user.ini file from being served by server

That code is wrong because the tag to close the virtual host is in the middle. You have 2 options

  # END: Support domain renewal when using mod_proxy within Location
#Hide .user.ini file from being served by server
<Files ".user.ini"><IfModule mod_authz_core.c> Require all denied
</IfModule> <IfModule !mod_authz_core.c> Order deny,allow Deny from all
</IfModule>
</Files>
#END: Hid .user.ini file from being served by server
 </VirtualHost>
  # END: Support domain renewal when using mod_proxy within Location
</VirtualHost> 

Rmember to restart Apache for the changes to take effect

github-actions[bot] commented 2 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 2 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.