Re: [users@httpd] Change HTTP status code in Custom Errors - next try

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua Slive wrote:
On 6/9/06, Karsten Konrad <karsten.konrad@xxxxxxxxxxx> wrote:
Greetings!

I'd like to change the custom errormessages so they don't return the
actual http code "502 Bad Gateway" but "503 Service Unavailable". I had
hoped, that including a status line in the header might work, but it
doesn't. Below I have included a fragment of my last attempt.

Does anybody know how to solve this?
I haven't found a clue neither the docs nor on google so far. :-(

The only way that I know of to lie about the status code is to point
your ErrorDocument at a CGI script that sends the Status: header.


Dear Joshua!

Thanks for the input! I had hoped, that I could avoid cgi/php stuff but I'll give it a try now.

After my post yesterday I had an other, maybe stubid, idea and tried to change the Header with mod_headers like this:

   <Location "/error/CUSTOM_SERVER_MAINTENANCE.html.var">
     Header set STATUS "503 Service Unavailable"
   </Location>

The result is the following line in the HTTP Header "Status: 503 Service Unavailable"
But the return code itself is still "HTTP/1.x 200 OK"

Best regards,
Karsten

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux