Please help~ HTTP ERROR 500, and have 2 Questions

Keywords: WordPress - AWS - Technical issue - Other

bnsupport ID: a1ad2025-43cb-ba0a-9ad9-3beda30f27b4

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/use-pagespeed/#disable-pagespeed
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/

Description:
I am using bitnami wordpress on aws. Few days ago, I set cloudflare and had some problem so I restored to previous.
Now it had ‘HTTP ERROR 500’ so I’ve checked (https://wpbuffs.com/http-error-500-wordpress/) but still have problem.

Q. I think, the problem related with bitnami wordpress. Please let me know if you have any idea.

Q. Where can I download my posts data? I want to download via FTP. Please let me know where is posts folder.

Hi @origilalala,

Thanks for using Bitnami. I have taken a look at your bndiagnostic bundle and I think I have found some errors.

Your wp-config.php is owned by the bitnami user and group instead of the daemon group for Apache to be able to access it. Can you update it by running the next command?

sudo chown bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-config.php

I also see you have defined the WP_MEMORY_LIMIT parameter twice in the wp-config.php file, and WordPress is also mentioning this as an error. Can you remove one of the definitions in the file?

PHP Notice:  Constant WP_MEMORY_LIMIT already defined in phar:///opt/bitnami/apps/wordpress/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 89

Finally it seems like your server is running out of free memory. Can you try using a bigger instance?

https://docs.bitnami.com/aws/faq/administration/change-server-type/

-----------------------------------
Display amount of free and used memory in the system
-----------------------------------
Running: free -m
In: /opt/bitnami

Output:

              total        used        free      shared  buff/cache   available
Mem:           1965         926          90          63         948         793
Swap:             0           0           0

Thanks for the guide.
I removed duplicated define and upgrade AWS instance type.
And it shows ‘ERR_CONNECTION_TIMED_OUT’ :disappointed_relieved::disappointed_relieved::disappointed_relieved:

Please let me know if you have any ideas.

Hi @origilalala,

Thanks for your message. Can you check all services are running now?

sudo /opt/bitnami/ctlscript.sh start
sudo /opt/bitnami/ctlscript.sh status

Can you also run the bndiagnostic tool again and share with us the new generated code?

Keywords: WordPress - AWS - Technical issue - Other

bnsupport ID: 79cfe7a7-8634-96ba-2932-c31c06f9f198

bndiagnostic output:

? Apache: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/use-pagespeed/#disable-pagespeed
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Description:
Please find my previous Q&A(Please help~ HTTP ERROR 500, and have 2 Questions)

So I’ve to upgrade AWS instance type and change IP (13.125.213.75/ -> 15.164.103.44)

But still, have a problem and I think it is apache. I can’t sign in '/wp-admin

Q. Please explain what can I do
Q. I want to download my posts. Is it possible?

Hello @origilalala,

Please don’t open 2 tickets for the same issue. We will continue helping in the other case. I will merge the issues.

Regards

GM @gongomgra,

I’ve checked running and it seems ok.
image

And mh new code is ‘a9658450-87b5-0382-85e8-ae0cb68b1776’ please check for that.

Thanks for your help. :smile:

Hello @davidg,

I got it.

Thanks

Hi @origilalala,

Thanks for the info and the new bndiagnostic code. I visited your website using the curl command-line tool and I think I know what’s causing your errors. The curl command failed with a curl: (47) Maximum (50) redirects followed error message, which is the same ERR_TOO_MANY_REDIRECTS I get using the browser. Find below part of the trace of the curl command

$ curl -LI "http://lalala***world.com"
HTTP/1.1 302 Found
Date: Thu, 25 Nov 2021 09:20:26 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Location: https://lalala***world.com/
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 301 Moved Permanently
Date: Thu, 25 Nov 2021 09:20:27 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Location: https://www.lalala***world.com/
Content-Type: text/html; charset=iso-8859-1

HTTP/1.1 301 Moved Permanently
Date: Thu, 25 Nov 2021 09:20:28 GMT
Server: Apache
X-Powered-By: PHP/7.4.7
X-Redirect-By: WordPress
Set-Cookie: uncode_privacy[consent_types]=%5B%5D; expires=Fri, 25-Nov-2022 09:20:28 GMT; Max-Age=31536000; path=/; secure; SameSite=Strict
X-Frame-Options: SAMEORIGIN
Location: https://lalala***world.com/
Content-Type: text/html; charset=UTF-8

HTTP/1.1 301 Moved Permanently
Date: Thu, 25 Nov 2021 09:20:28 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Location: https://www.lalala***world.com/
Content-Type: text/html; charset=iso-8859-1
(...)
curl: (47) Maximum (50) redirects followed

As you can see, Apache is redirecting all requests to https://www.yourdomain.com, but WordPress is configured with https://yourdomain.com only (no www subdomain), which is causing the redirect loop. Can you update the wp-config.php with https://www.YOUR_DOMAIN.com (remember to replace the YOUR_DOMAIN placeholder), restart Apache and try again?

If you continue having issues, please run the tool again and share it with us so we can check the updated config.

1 Like

Great!
It works!
Really appreciate @gongomgra

Have a happy day~ :grin: :grin: :grin:

Hi @origilalala,

Thanks for the info. I’m glad you fixed your issue! We will close this thread as solved. Please do not hesitate to open a new one with any other questions you may have.