-
Notifications
You must be signed in to change notification settings - Fork 43
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
[LAMP] Custom HTTP 500 Error Page #1536
Comments
Hi @kotobakards, You deployed a WordPress app on top of the LAMP solution and it's probably managing the errors by itself. You will need to take a look at the app's documentation to get more information about that. Regarding the Apache's conf files to edit, the changes you made in the bitnami.conf and bitnami-ssl.conf files should be enough. |
@jotamartos - I definitely didn't deploy a WordPress site, unless it came with the image? I do have other WordPress instances in my Lightsail account, but I spun up this LAMP stack instance specifically for testing the 5XX error messages. I had started on a different LAMP instance that I had been using for a while. When I couldn't get the 500 error message to show on that instance, I created a new fresh instance in case it was in fact something that was already installed on the server that was interfering. The screenshots in my original comment are from that brand new instance. Screenshot showing that I'm using a LAMP image through Lightsail instead of the WordPress one. Loom video demonstrating the issue. |
Hi @kotobakards, Sorry, I thought it was a WordPress app when I accessed your domain. I just performed a quick test and deployed a sample "Hello world" website using PHP under apache/htdocs. I also edited the apache/conf/bitnami/bitnami.conf file (I didn't configure http->https redirections) and added the line to manage the 404 errors
The test succeeded
In your case, the app may be managing the errors and that's why you get the app's error message instead of the one you configured in Apache. You will need to review that. |
@jotamartos - thanks for getting back to me! Please see the previously provided screenshots and Loom video.
On the test instance you deployed, can you get the 500 error message to show if you have a bug in your PHP code (such as a missing semicolon)? |
I get the 500 error code but Apache doesn't show the custom error.
I do not know why Apache is not managing the error the way we configured. I suggest you take a look at the documentation and the forums online to get more information about why Apache doesn't manage that the expected way. |
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. |
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. |
Platform
AWS
bndiagnostic ID know more about bndiagnostic ID
02399490-027a-7d25-a11d-c3d3b72745f1
bndiagnostic output
===== Begin of bndiagnostic tool output =====
bndiagnostic was not useful. Could you please tell us why?
None of the output categories were related to my issue
Describe your issue as much as you can
I'd like to display a custom error page for HTTP 5XX errors. However, for now I would settle with just displaying a custom message (let alone trying to display an actual error page). I can get the custom error message to display for 4XX errors, but not for 5XX errors.
When I visit a page that I know doesn't exist on the server, the custom 404 message displays.
However, when I visit a page where I intentionally put a bug in some PHP code, the custom 500 error message does not display.
Relevant portion of my /opt/bitnami/apache/conf/httpd.conf file:
Relevant portion of my /opt/bitnami/apache/conf/bitnami/bitnami.conf file:
Relevant portion of my /opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf file:
The text was updated successfully, but these errors were encountered: