bitnami / vms

Bitnami VMs
https://bitnami.com
Other
206 stars 43 forks source link

Wordpress Server ports 22, 80 and/or 443 are not publicly accessible. #1440

Closed krmtech closed 6 months ago

krmtech commented 6 months ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

a40242ec-feee-9dd8-3585-7bc695b6f00c

bndiagnostic output

[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]

Found recent error or warning messages in the Apache error log.

[Sun Mar 10 23:02:10.819338 2024] [autoindex:error] [pid 2283222:tid 
140362173556480] [client **ip_address**:3504] AH01276: Cannot serve directory 
/opt/bitnami/wordpress/wp-admin/images/: No matching DirectoryIndex 
(index.html,index.html,index.htm,index.php) found, and server-generated 
directory index forbidden by Options directive
 [Sun Mar 10 23:02:11.007462 2024] [autoindex:error] [pid 2283222:tid 
140362165163776] [client **ip_address**:3504] AH01276: Cannot serve directory 
/opt/bitnami/wordpress/wp-admin/css/colors/: No matching DirectoryIndex 
(index.html,index.html,index.htm,index.php) found, and server-generated 
directory index forbidden by Options directive
 [Sun Mar 10 23:02:13.132999 2024] [authz_core:error] [pid 2283222:tid 
Press [Enter] to continue:
140362114807552] [client **ip_address**:3504] AH01630: client denied by server 
configuration: /opt/bitnami/apache/cgi-bin

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

seems useful

Describe your issue as much as you can

Wordpress site on AWS Instance not accessible.

AWS reports: Instance Status: Running, Firewall Ports Open and not restricted, However bndiagnostic reports that the ports are NOT accessible.

gongomgra commented 6 months ago

Hi @krmtech,

Thanks for using Bitnami. The bndiagnostic tool relays on the netcat tool under the hood, which seems to be not installed on your system.

-----------------------------------
Check if port 80 is externally accessible:
-----------------------------------
Running: nc -zv -w5 <your-IP> 80
In: /opt/bitnami
Error: /tmp/tmp1710158948-7680.sh: 1: nc: not found
Exitcode: 127

-----------------------------------
Check if port 443 is externally accessible:
-----------------------------------
Running: nc -zv -w5 <your-IP> 443
In: /opt/bitnami
Error: /tmp/tmp1710158949-7680.sh: 1: nc: not found
Exitcode: 127

However, I have run those commands from my machine without errors, so you don't have to worry:

$ nc -zv -w5 <your-IP> 80
Connection to <your-IP> port 80 [tcp/http] succeeded!

$ nc -zv -w5 <your-IP> 443
Connection to <your-IP> port 443 [tcp/https] succeeded!

Hope it helps!

krmtech commented 6 months ago

Thank you but Still not working.

Any idea why this would be lost suddenly on an instance that has been functioning?

gongomgra commented 6 months ago

Hi @krmtech,

I think your issue is related to your Apache and domain configurations. According to the test I performed, your website is redirecting all requests to an www domain that doesn't exist in the DNS registries

$ curl -LI "http://52._REDACTED_.212"
HTTP/1.1 301 Moved Permanently
Date: Wed, 13 Mar 2024 15:50:20 GMT
Server: Apache
X-Redirect-By: WordPress
Set-Cookie: rfqtk_wp_session_415290769594460e2e485922904f345d=03fdbc1a0960984ac82d3696cfff5dfd%7C%7C1712937020%7C%7C1713045020; expires=Fri, 12 Apr 2024 15:50:20 GMT; Max-Age=2592000; path=/
Location: https://www.susa_REDACTED_ker.com/
Content-Type: text/html; charset=UTF-8

curl: (6) Could not resolve host: www.susa_REDACTED_ker.com

You will have to add a new CNAME DNS entry for the www domain pointing to the non-www domain. You can also check the DNS information is propagated globally using the whatsmydns.net website.

Hope it helps!

github-actions[bot] commented 6 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 6 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.