httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 60604] New: RewriteRule returning 200 for ErrorDocument 503
Date Thu, 19 Jan 2017 01:24:43 GMT

            Bug ID: 60604
           Summary: RewriteRule returning 200 for ErrorDocument 503
           Product: Apache httpd-2
           Version: 2.4.18
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
  Target Milestone: ---

I'm trying to setup a custom 503 page for when system maintenance is
required.My server is Apache 2.4.18 (Ubuntu). Everything works as expected,
except the return code for my error page is 200 instead of 503. I'm using a
config that worked on old servers and there's lot of examples on google that
have the same issue on my server.

This is within a Vhost and the server is running a few other sites.

Here's the config:
RewriteEngine On

RewriteCond "/maintenance.trigger" -f
RewriteCond %{REQUEST_URI} !=/maintenance.trigger
RewriteRule . - [R=503]

and this is what I get from curl:
HTTP/1.1 200 OK
Date: Thu, 19 Jan 2017 00:53:26 GMT
Server: Apache
Last-Modified: Wed, 18 Jan 2017 22:20:09 GMT
Content-Type: text/html
X-Content-Digest: 8fef50fc2724187fd362f2412e036e2853efa674
Age: 0
X-Rack-Cache: stale, valid, store
Content-Length: 17
Cache-Control: max-age=2592000
Expires: Sat, 18 Feb 2017 00:53:26 GMT

test 503 page

I've tried this a a few different ways and noticed that:
ErrorDocumet 503 "test 503 from config file"

does the right things, unfortunately I would like to have a nicer error page
than what can be included in a config file.

I also tried with "ProxyErrorOverride On" but that had no effect.

thank you

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message