小编Lor*_*yna的帖子

Nginx 反向代理错误页面

我使用 nginx 作为一台机器的反向代理。当后端机器出现故障时,我希望有一个错误页面。

这是我的配置文件:

server {
    listen   80;
    access_log  /var/log/nginx/access.log;
    root /var/www/nginx;
    error_page 403 404 500 502 503 504 /error.html;
    location / {
            proxy_pass      http://192.168.1.78/;
            include         /etc/nginx/proxy.conf;
    }
Run Code Online (Sandbox Code Playgroud)

nginx

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

nginx ×1