Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WordPress] use Apache status module "mod_status.so". Latest AWS Bitnami EC2 Wordpress Apache Image. #1491

Closed
marcus-sm8a opened this issue Apr 18, 2024 · 5 comments
Assignees
Labels
solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed wordpress

Comments

@marcus-sm8a
Copy link

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

d1d0db01-5d88-c766-fd4e-1ef6c6e4fb13

bndiagnostic output

===== Begin of bndiagnostic tool output =====

✓ Processes: No issues found
✓ Mariadb: No issues found
? Connectivity: Found possible issues
✓ Php: No issues found
? Apache: Found possible issues
? Resources: Found possible issues
✓ Wordpress: 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:
Found recent error or warning messages in the Apache error log.

[Thu Apr 18 00:59:39.677154 2024] [proxy_fcgi:error] [pid 40773:tid 
139900481423040] [client **ip_address**:26280] AH01071: Got error 'PHP message: 
PHP Warning: Undefined array key "HTTP_X_FORWARDED_PROTO" in 
/bitnami/wordpress/wp-config.php on line 103'
 [Thu Apr 18 00:59:56.081968 2024] [proxy_fcgi:error] [pid 41437:tid 
139900296783552] [client **ip_address**:2824] AH01071: Got error 'PHP message: 
PHP Warning: Undefined array key "HTTP_X_FORWARDED_PROTO" in 
/bitnami/wordpress/wp-config.php on line 103'
 [Thu Apr 18 01:00:09.694977 2024] [proxy_fcgi:error] [pid 41436:tid 
139899726407360] [client **ip_address**:45170] AH01071: Got error 'PHP message: 
PHP Warning: Undefined array key "HTTP_X_FORWARDED_PROTO" in 
/bitnami/wordpress/wp-config.php on line 103'

Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro
rs-apache/

[Resources]

Press [Enter] to continue:
Your instance has little available RAM memory.

 total used free shared buff/cache available Mem: 3883 1443 520 47 2221 2440 
Swap: 0 0 0

You could try to increase your instance's memory. Please check your cloud
provider's documentation for more information.

===== End of bndiagnostic tool output =====

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

Using AWS Application Load Balancer

Describe your issue as much as you can

I am trying to use the server-status module by apache, we are trialing apache monitoring software via New Relic, this monitoring requires this mod_status module running via apache.

I have been unable to successfully get this page working "server-status". at most it tells me "Forbidden" when I try to access "/server-status"

New relic client doesn't seem to support the Bitnami modified apache configuration as original folders moved etc by bitnami.

I am slightly unclear where I need to put the following information to enable "server-status"
The information below is it for the bitnami.conf file or the https.conf file? or under the .conf files under the "vhosts" directory.

<Location "/server-status">
SetHandler server-status
Require host example.com

But I suspect that I am missing something else?

Are you guys able to push me in the right direction to enable "server-status" for your wordpress images? or do you not recommend enabling this for security reasons?

We are also currently trailing this Wordpress setup behind an application load balancer, so the SSL termination is completed on the ALB, and only HTTP 80 is sent to wordpress, no certificate is installed on the VM. this seems to work ok, but I am getting a notice in the apache error logs below

Got error 'PHP message: PHP Warning: Undefined array key "HTTP_X_FORWARDED_PROTO" in /bitnami/wordpress/wp-config.php on line 103'.

this seems to be in reference to the following entry in the wp-config file
lines 103 and 104 are below

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';

Are you guys able to push me in the right direction, is something else not being declared?

This for your help as always.

@marcus-sm8a marcus-sm8a added the tech-issues The user has a technical issue about an application label Apr 18, 2024
@github-actions github-actions bot added the triage Triage is needed label Apr 18, 2024
@jotamartos
Copy link
Collaborator

I am slightly unclear where I need to put the following information to enable "server-status"
The information below is it for the bitnami.conf file or the https.conf file? or under the .conf files under the "vhosts" directory.

<Location "/server-status">
SetHandler server-status
Require host example.com
But I suspect that I am missing something else?

Are you guys able to push me in the right direction to enable "server-status" for your wordpress images? or do you not recommend enabling this for security reasons?

As WordPress is set to work at the root path of your domain, all requests will be redirected to the application. If you want to redirect/manage those requests to /server-status differently, you will need to edit the wordpress and wordpress-https files under the vhosts directory.

We are also currently trailing this Wordpress setup behind an application load balancer, so the SSL termination is completed on the ALB, and only HTTP 80 is sent to wordpress, no certificate is installed on the VM. this seems to work ok, but I am getting a notice in the apache error logs below

There is an old guide here that explains how to configure this with the WordPress solution. However, paths were not updated with the new directory structure.

https://docs.bitnami.com/aws/how-to/configure-elb-ssl-aws/

/opt/bitnami/apps/APPNAME/conf/httpd-prefix.conf would be both wordpress and wordpress-https conf files under the vhosts folder and /opt/bitnami/apps/wordpress/htdocs/wp-config.php is at /opt/bitnami/wordpress/wp-config.php.

@jotamartos jotamartos changed the title use Apache status module "mod_status.so". Latest AWS Bitnami EC2 Wordpress Apache Image. [WordPress] use Apache status module "mod_status.so". Latest AWS Bitnami EC2 Wordpress Apache Image. Apr 19, 2024
Copy link

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 github-actions bot added the stale 15 days without activity label May 22, 2024
Copy link

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.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed wordpress
Projects
None yet
Development

No branches or pull requests

5 participants
@jotamartos @bitnami-bot @marcus-sm8a and others