歡迎您光臨本站 註冊首頁

nginx 0.7.59 配置404 502 自定義錯誤請教

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

nginx 0.7.59 配置404 502 自定義錯誤請教

環境:centos 5.3
       nginx-0.7.59

nginx 0.7.59 配置404 502 自定義錯誤請教,以下是配置,當我把192.168.1.11:8080的apache 服務停了,訪問www.tt.com 出現

502 Bad Gateway

--------------------------------------------------------------------------------

nginx/0.7.59

沒有出現自定義的502錯誤,404 也不生效,請問應該怎麼設置。謝謝!

upstream test {
        server 192.168.1.11:8080;
    }

    server {
        listen       80;
        server_name  www.tt.com;
        location / {
                       proxy_pass         http://test;   
                       
                   }
       error_page  404             /var/www/404.html;
       error_page  502             /var/www/502.html;
           }


換成  error_page  404   =200          /var/www/404.html; 也沒效果.

[火星人 ] nginx 0.7.59 配置404 502 自定義錯誤請教已經有522次圍觀

http://coctec.com/docs/service/show-post-3297.html