【发布时间】:2020-02-04 23:59:03
【问题描述】:
我的 nginx 配置中有一个简单的位置,但从未被捕获
server {
listen 80 default_server;
server_name _;
location /healthcheck {
access_log off;
add_header Content-Type "text/plain";
return 200 "OK\n";
}
return 301 http://www.google.fr;
}
每次我转到http://xxx/healthcheck 时,都不会检测到该位置,我会被重定向到 Google。
我在文件中做错了什么? 谢谢
【问题讨论】:
标签: nginx nginx-location nginx-config