- Published on
Nginx Errors
- Authors
- Name
- Bowen Y
ERROR
CODE
server {
listen 80;
server_name _; # This is a catch-all server name
location /health-check {
return 200 'healthy\n';
add_header Content-Type text/plain;
}
# The rest of your server configuration goes here...
}
RUN
sudo nginx -t
RESULT
nginx: [warn] conflicting server name "_" on 0.0.0.0:80, ignored
EXPLANATION
There are multiple blocks have the same wildcard server listening