3 messages in ru.sysoev.nginxRe: new nginx module: notice
FromSent OnAttachments
Keith RarickJun 15, 2007 1:36 pm 
Igor SysoevJun 16, 2007 4:33 am 
Keith RarickJun 18, 2007 10:46 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: new nginx module: noticeActions...
From:Keith Rarick (kr-z@public.gmane.org)
Date:Jun 18, 2007 10:46:02 pm
List:ru.sysoev.nginx

On 6/16/07, Igor Sysoev <is-G@public.gmane.org> wrote:

error_page 503 =200 /notice.html;

location / {

if (-f /var/www/notice.html) { return 503; }

location = /notice.html { root /var/downtime; }

Thanks! Unfortunately, I over-simplified the situation a bit in my previous mail. We actually have three different files we want to display during downtime, depending on the url. So we do:

if (-f /var/downtime/notice.html) { rewrite ^/health(.*)$ /health.txt break; rewrite ^/facebook/(.*)$ /fb-notice.fbml break; rewrite ^(.*)$ /notice.html break; break; }

location = /health.txt { notice /var/downtime/health.txt; notice_type text/plain; break; } location = /fb-notice.fbml { notice /var/downtime/fb-notice.fbml; break; } location = /notice.html { notice /var/downtime/notice.html; break; }

Is there a way to use error_page 503 this way for more than one file?

Have a good vacation!

kr