custom-error-pages

nginx + fastCGI for PHP error_page

隐身守侯 提交于 2021-02-10 07:06:48
问题 I set up custom error pages in nginx with fastCGI for PHP like this way and it works: root <FOLDER>; error_page 404 /error.php?404; location = /error.php { include /etc/nginx/fastcgi.conf; fastcgi_pass 127.0.0.1:1234; root <FOLDER>; } But since I have one error.php for every HTTP error codes, I wanted to set up in a general form. The problem is that I don't know if nginx provide the error code to be passed by GET to error.php I am looking for something like: root <FOLDER>; error_page 500 501

nginx + fastCGI for PHP error_page

帅比萌擦擦* 提交于 2021-02-10 07:05:03
问题 I set up custom error pages in nginx with fastCGI for PHP like this way and it works: root <FOLDER>; error_page 404 /error.php?404; location = /error.php { include /etc/nginx/fastcgi.conf; fastcgi_pass 127.0.0.1:1234; root <FOLDER>; } But since I have one error.php for every HTTP error codes, I wanted to set up in a general form. The problem is that I don't know if nginx provide the error code to be passed by GET to error.php I am looking for something like: root <FOLDER>; error_page 500 501

cPanel Custom 401 Error Page “Not Displaying”

余生颓废 提交于 2021-01-28 20:24:26
问题 My problem: For some reason my custom 401 error page is not displaying on login and is just displaying the generic 401 error page: Unauthorized This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required. Additionally, a 401 Unauthorized error was encountered while trying to use an ErrorDocument to handle the request. Now in

How to use custom Errors page in Windows Authentication

我是研究僧i 提交于 2020-01-28 09:54:25
问题 I am using asp.net 3.5 web.config to limit access and it works great. <authentication mode="Windows"> <authorization> <allow users="Bill, John"/> <deny users="*"/> </authorization> Unauthorized (but authenticated) users will be blocked by a system error message saying that: Server Error in '/' Application Access is denied. Description: An error occurred while ....... Error message 401.2: Unauthorized: Logon failed due to server configuration ... In order to make the message more friendly, I

Return custom 403 error page with nginx

旧巷老猫 提交于 2020-01-22 18:53:54
问题 Im trying to display the error page in /temp/www/error403.html whenever a 403 error occurs. This should be whenever a user tries to access the site via https (ssl) and it's IP is in the blovkips.conf file, but at the moment it still shows nginx's default error page. I have the same code for my other server (without any blocking) and it works. Is it blocking the IP from accessing the custom 403 page? If so how do I get it to work? server { # ssl listen 443; ssl on; ssl_certificate /etc/nginx

Return custom 403 error page with nginx

无人久伴 提交于 2020-01-22 18:53:40
问题 Im trying to display the error page in /temp/www/error403.html whenever a 403 error occurs. This should be whenever a user tries to access the site via https (ssl) and it's IP is in the blovkips.conf file, but at the moment it still shows nginx's default error page. I have the same code for my other server (without any blocking) and it works. Is it blocking the IP from accessing the custom 403 page? If so how do I get it to work? server { # ssl listen 443; ssl on; ssl_certificate /etc/nginx

500 error page not showing on Heroku

不打扰是莪最后的温柔 提交于 2020-01-21 13:19:36
问题 I'm trying to get a custom 500 error page to show on Heroku, running rails 3.2.11 I've followed the steps at: https://devcenter.heroku.com/articles/error-pages The process worked fine for the maintenance page, but doesn't seem to work for the error page. I'm positive the S3 URL is correct in Heroku, and when I visit the S3 URL directly I can view the error page just fine (it is set to public). config.consider_all_requests_local is set to false in production.rb Any ideas as to why Heroku is

Django handler500 as a Class Based View

狂风中的少年 提交于 2020-01-14 07:29:09
问题 Why does this not work handler500 = TemplateView.as_view(template_name="500.html") I get the following exception: Traceback (most recent call last): File "/usr/lib/python2.6/wsgiref/handlers.py", line 94, in run self.finish_response() File "/usr/lib/python2.6/wsgiref/handlers.py", line 134, in finish_response for data in self.result: File "/home/hatem/projects/leadsift_app/.virtualenv/lib/python2.6/site-packages/django/template/response.py", line 117, in __iter__ raise ContentNotRenderedError

The configuration section 'httpErrors' cannot be read because it is missing a section declaration

吃可爱长大的小学妹 提交于 2020-01-06 07:38:07
问题 I am trying to configure a custom error page for the 403 Forbidden response in my WebApi application by adapting Example of Configuration for <httpErrors>. I added <httpErrors> to my Web.config but I'm getting HTTP Error 500.19 and The configuration section 'httpErrors' cannot be read because it is missing a section declaration . How can I fix it? My code: <system.web> .... <httpErrors errorMode="Custom"> <remove statusCode="403" subStatusCode='-1' /> <error statusCode="403" path="/forbidden

Provide a custom error page for 401 (failed authorization)

≯℡__Kan透↙ 提交于 2020-01-06 04:46:13
问题 I'm using Windows Authentication. The authentication works fine (the user is loaded with it's roles). It's when authorization fails (using the Authorize ) attribute that I want to provide a custom error page. It seems like the HandleError attribute only gets invoked for thrown exceptions but not for any error status codes ( >= 300 ). Custom errors section: <customErrors mode="On" defaultRedirect="~/Error/"> <error statusCode="404" redirect="~/Error/NotFound/" /> <error statusCode="401"