Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [http-status-code]

The tag has no usage guidance.

19
votes
3answers
26k views

How can I use a custom 503 error document when HAProxy sends a 503 HTTP code?

I would like haproxy to use its own 503 document page when back server (backend) sends HTTP 503 code. Is it possible? Have seen something like "monitor fail" conditions but don't know how to add it ...
12
votes
1answer
33k views

What does http code 206 (partial content) really mean?

I'm building a page (using video.js, should it matter) that holds players for a reasonably large number of videos -- click a button on a thumbnail of the image and a modal player opens up, playing the ...
11
votes
3answers
12k views

How do I configure nginx to return 429 http code when rate limiting?

How do I configure nginx to return http status code 429 (Too Many Requests) instead of the default 503 (Service Unavailable) when throttling/rate limiting? FYI, I'm using nginx as a reverse proxy ...
10
votes
2answers
24k views

How to check HTTP response code of a secured website with Nagios?

I want to create a nagios check of my secure website. All the check needs to do is login to the site with login details that I pass the script. Does anyone know of a plugin or script that will allow ...
10
votes
3answers
6k views

Is it safe to use HTTP status 308 Permanent Redirect?

Is it safe to use the HTTP status code 308 Permanent Redirect (suggestion) in server responses? The issue with 301 Moved Permanently is that it only works with GET requests (to be fair: POST will ...
9
votes
3answers
4k views

What's the difference between 301 and 302 in HTTP?

I see all tinyurl like sites use 302 But what's the difference?Seems both are working for me
7
votes
1answer
2k views

HTTP status code to signal bad or missing Host header

Is there an HTTP status code which is appropriate to use for clients which send a bad hostname (or none at all) through SNI or the HTTP Host header? An older question address how and why such ...
7
votes
2answers
11k views

POST request is repeated with nginx loadbalanced server (status 499)

double uploads Ever since we went from a simple Apache instance to a loadbalanced environment, there are sometimes issues with POST requests getting repeated. We are running nginx as reverse proxy. ...
5
votes
2answers
2k views

Best error code for 'generic error'

I'm creating custom error pages for my site. I want one that, if there is a generic error (invalid querystring, improper authentication, etc.) that will be shown. This is easy enough, problem is, ...
4
votes
3answers
11k views

Disabling IIS 7.5 server error response for 5xx and 4xx HTTP status codes

Is there any way to prevent IIS from automatically overriding the output of a web app that is returning a status code in the 500 or 400 range? Just as an example, in ColdFusion I can create the ...
3
votes
3answers
7k views

HTTP/1.1 Status Codes 400 and 417, cannot choose which

I have been referred to here that it might be of better help, I've got a processing file which handles the user sent data, before that, however, it compares the input from client to the expected ...
2
votes
2answers
2k views

How to configure mod_evasive to show HTTP status 429 instead of 403?

Some search engine spiders like Bingbot crawl too rapidly and does not seem to obey robots.txt crawl-delay directive. This triggers the DOS defence mechanism in mod_evasive to generate HTTP 403 ...
2
votes
1answer
1k views

How to return 410 with lighttpd

I have a subdomain with service I am going to kill. I'd like to use 410 to mark it as such. Is there a way to do that with lighttpd without resolving to mod_magnet and lua scripts?
2
votes
1answer
147 views

Some apache log questions

In the following log snippet what could cause certain requests to return a 302 status and the last one to return a 200 status? As I understand it 302 means "The requested resource resides temporarily ...
2
votes
3answers
3k views

Server returns a 404 code when requesting HEAD?

I configured my server with Nginx (v= ), and when I try to request using HEAD, I got a 404 : curl -I http://postera.in HTTP/1.1 404 Not Found Server: nginx/1.2.1 Date: Thu, 19 Dec 2013 09:51:53 GMT ...
2
votes
1answer
490 views

Is it possible to set the Status-Line header with Apache's Header directive?

My searches have turned up blank... I'm trying to change the 403 Forbidden status of the response to a 404 Not Found status with this line: Header set Status-Line "HTTP/1.1 404" "expr=%{...
2
votes
1answer
956 views

ShellShock test shows wget and curl access

I've fixed shellshock bug on my Debian 6 server and while testing on http://shellshock.brandonpotter.com/ I get "No Vulnerabilities Found" and that's OK but they also check other things and in the ...
1
vote
2answers
278 views

How should web servers handle requests with incorrect Host header?

I am getting a number of requests to my site with the Host header set incorrectly (most commonly to the IP address instead of domain name). Currently I am returning 400 Bad Request. I am thinking of ...
1
vote
1answer
9k views

Nginx-Always return 403 status code

I'm trying to get Nginx to return a simple webpage, but always with an http status code of 403. For some reason, I just can't get it to work. I have two files in /var/www/html/: index.html photo.jpg ...
1
vote
3answers
905 views

Web Server (Intranet) Availability Test Script/Program

After rebooting a number of web servers (around 40), I would like to be able to quickly test each one to ensure that they are all up, running and will return an HTTP 200 code when called. Please can ...
1
vote
2answers
2k views

Apache ErrorDocument 400 https redirection without 302 found page with the actual link

When I force the error 400 by trying http on a https port I get a 302 found code with the https://myserver/mypage.html link I want to show, and I have to click it to get to the page How can I skip ...
1
vote
3answers
1k views

Is it possible to do a 301 redirect AND redirect to the requested resource?

For one of our projects, we're doing a rebranding of the website name, logo, etc... As such, we need to 301 Moved Permenantly redirect all users from the old domain to the new domain. With IIS7, ...
1
vote
1answer
759 views

How can I set HTTP status code reason phrases in nginx

The reason phrases of HTTP responses that accompany a status code are not fixed. Instead of returning 200 OK it would be legal to return 200 Everything fine. nginx has predefined reason phrases for ...
1
vote
1answer
20 views

What HTTP status code to avoid instances being marked as unhealthy on AWS Elastic Beanstalk

I am running an application on AWS Elastic Beanstalk. If an instance responds too often with an HTTP status code in the 500 (server error) range AWS marks this instance as unhealthy and removes the ...
1
vote
1answer
47 views

413 error in apache even though my POST is much smaller than the max limit

I have asked this question on stack overflow as well. I have an apache server and a fastcgi script. When I try to send POST request to my script, it fails giving me the 413 error. If I send in no ...
1
vote
1answer
638 views

Nginx - Wrong Response Header

when installing joomla I face an issue realated to response header. During the installation process, an ajax post request send to server which in response status is 303 instead of 200 ! so ajax ...
1
vote
1answer
915 views

Reading IIS error logs - status and substatus

While trying to troubleshoot an IIS error I came upon a guide that discussed the error code in the IIS log. The 4 server logs you NEED to know to fix any IIS / ASP.NET error The post uses the ...
1
vote
1answer
1k views

NGINX : Proxy pass intercepting 5xx errors - Possible to differentiate between ones fired by backed vs ones fired by nginx itself?

We use proxy_intercept_errors ( http://wiki.nginx.org/HttpProxyModule#proxy_intercept_errors ) with our backends. We intercept a number of status codes, including a few 5xx ones. Our 5xx (each 500 ...
1
vote
0answers
90 views

Unable to find IIS response logs for php calls

I'm having trouble finding IIS logs for non-erroring calls to php files. I've recently been given ownership of an IIS 7.5 server that runs php. While digging through logs, I can't find any records ...
1
vote
0answers
147 views

Enabling logwatch to log successful requests as well

I have a very low-volume http server (Nginx) which is used by only a few users and otherwise receives some probes from hackers. For this installation I would like the logwatch output to include ...
1
vote
2answers
910 views

Openshift + HAproxy 503 custom page

I'm using 503 HTTP Status and a coming soon page for maintenance mode. Is there any way to get HAproxy serving server-side generated 503 page instead of the default blank/unavailable page? I'm using ...
1
vote
0answers
144 views

HAProxy HTTP Response “Other”

The HAProxy documentation lists the possibility of returning non-conforming HTTP status codes: hrsp_other [.FBS]: http responses with other codes (protocol error) Are these simply error codes ...
1
vote
0answers
406 views

Is it correct that Nginx reports HTTP/1.1 status codes with SPDY (3.1)?

Questions Do I have to look at response headers like X-Firefox-Spdy to determine which protocol was actually used? Can I assume that Nginx will report HTTP/2 status codes once the implementation is ...
1
vote
0answers
540 views

Changing status code from proxied backend server with nginx

I am proxying some paths to another server. That server responds with 302 Moved Temporarily. I need to change that particular status code to 200 OK. Otherwise I can pass response through as-is and ...
1
vote
0answers
2k views

IE 10 HTTP 401 Error on AJAX POST

I've been chasing down an issue and decided to make the most basic reproduction of the issue possible in hopes that a simplified question will help me resolve this. I am receiving a 401 error when ...
1
vote
1answer
477 views

IIS7 and HTTP status code handling

This question is posted on Stack Overflow, and I'm cross-posting here because I think this might be a more correct forum for it. I'm having a hardcore head-ache from trying to get complete ...
1
vote
1answer
253 views

WSGI: get status 200 OK instead of 404

what's wrong with the following WSGI setup based on Apache 2.2, Windows and mod_wsgi 3.3? The problem is that the client gets an OK response status even visiting URLs that don't have an associated ...
1
vote
0answers
535 views

IE6 does not follow 302 redirect - displays 404 instead

One of our clients has reported that they are experiencing 404 (file not found) errors when attempting to navigate a website that we support. The behaviour only appears to affect her - other users on ...
0
votes
2answers
2k views

Why does my 404 return 200 status code?

Not sure why but all of my error pages respond with a 200. That's feels a little strange to me, the pages exist but shouldn't they have their corresponding status codes? How do I get Nginx to render ...
0
votes
3answers
35 views

Argument for providing 200 response on non-existent file

Does it ever make sense for a server to provide a 200 response when a GET request is made for a non-existent file? Shouldn't the response always be a 404? Here's the response header: {'Date': 'Tue, ...
0
votes
1answer
1k views

Nginx : How to server error_pages (404, etc) using uwsgi url?

I know it's possible to server static files using error_page in NGinx, but I was wondering if it was possible to server an url from my local (socketed) Flask app that is served through UWsgi. Here's ...
0
votes
1answer
1k views

Apache returns 400 instead of 200 at DocumentRoot

I am seeing a lot of these odd entries in my Apache access log: SOME IP ADDRESS - - [23/Feb/2012:03:06:38 -0800] "GET /" 400 460 "-" "-" If I try to access the Apache document root, I get: MY IP ...
0
votes
1answer
45 views

nginx: how to disable access_log for ($http_status == 200)

Is there any way to disable access_log for 200 HTTP response code? I tried using conditions but it seems access_log directive is not allowed in an if block. I tried this: access_log /var/log/nginx/...
0
votes
1answer
52 views

Can I customise netdata not to alert me about 303 redirects?

I use 303 codes (correctly, I believe) to redirect a user after they've submitted a form. Unfortunately this means that a few times every day I get an alert from netdata along the lines of: netdata ...
0
votes
1answer
1k views

Expire 410 responses in nginx

Browsers cache 410 Gone responses indefinitely by default. An accidental 410 can kill the URL forever. The URL might be also resurrected later for other reasons. I would like to set expires for 410s ...
0
votes
1answer
194 views

Trouble understanding NGINX configuration

I was getting 403 & 404 errors on a Magento application I was working on I tracked down the issue to two blocks in the NGINX configuration, if I comment them out the issues are resolved but I ...
0
votes
1answer
3k views

HAProxy HTTP Codes

I was wondering if is there any way to track different HTTP codes that HAProxy send to clients. For example, have a log with just a list of different status codes: 200 200 302 404 499 500 Having ...
0
votes
1answer
562 views

Apache reports status 200 but file doesn't exist in the server

In Apache access log I have these lines repeating all over the file: 186.44.190.132 - - [22/Feb/2013:23:41:34 +0100] "POST /includes/wishlistcwh.php HTTP/1.1" 200 42416 "-" "Mozilla/5.0" 151.246.16....
0
votes
1answer
1k views

IIS logs status code 590

Background: Trying to chase a bug where resources occasionally won't load. Only happens on mobile devices. Last five columns in IIS logs are cs(User-Agent) sc-status sc-substatus sc-win32-status time-...
0
votes
1answer
207 views

Nginx Proxy Pass - Return Status code form upstream site

How do I return the HTTP STATUS CODE from the http://127.0.0.1:8080/ Example: http://127.0.0.1:8080/api/example returns a 500 then when accessing ttp://127.0.0.1/api/example it should also return ...