[英]Nginx error_page seemingly returns 503 instead of serving capacity page when 503 encountered
[英]nginx error_page not redirecting with basic setup
我正在使用標准500.html消息運行Rails應用,在我的nginx.conf中,我有:
server {
listen 80 default;
root ~/Projects/rails/localstyling;
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_pass http://localhost:3000;
error_page 500 502 503 504 /500.html;
}
error_page 500 502 503 504 /500.html;
}
我嘗試添加proxy_intercept_message;
剛好在error_page部分上方,但無法正常工作。 我無法讓nginx停止提供其自己的500個錯誤頁面。
server {
listen 80 default;
root <HOME DIRECTORY>/Projects/rails/localstyling;
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_pass http://localhost:3000;
error_page 500 502 503 504 /500.html;
}
error_page 500 502 503 504 /500.html;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.