nginx http服务器位置包含未知指令错误

nginx http服务器位置包含未知指令错误

我的 nginx.conf

worker_processes 1;
events {
    worker_connections 1024;
}

http {
    upstream app_servers {
        server 127.0.0.1:5000;
        server 127.0.0.1:5001;
    }

    server {
        listen 6200;
        server_name test;
        add_header X-GG-Cache-Status $upstream_cache_status;
        include rewrite.conf;
    }
}

和我的 rewrite.conf 在同一个文件夹中

location = / {
    rewrite ^/some-custom-destination/?$ /destination/detail?id=33;
    proxy_pass http: //app_servers;
    proxy_intercept_errors on;
    error_page 400 404 /;
    error_page 500 502 503 504 /error.html;
    location = /error.html {
        root /etc/nginx/;
    }
}

我该如何修复它?

请帮忙。谢谢。

相关内容