server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
#root /usr/share/nginx/www;
root /home/ubuntu/node-login;
# Make site accessible from
server_name ec2-xx-xx-xxx-xxx.us-west-1.compute.amazonaws.com;
location /{
proxy_pass http://127.0.0.1:8000/;
proxy_redirect off;
}
}nginx error "tên mâu thuẫn máy chủ" phớt lờ
kết quả này do lỗi nignx [cảnh báo] mâu thuẫn tên máy chủ "EC2 ..." trên 0.0.0.0:80 lờ Tôi không hiểu, bất kỳ lời giải thích đánh giá cao. Cảm ơn.
Dường như có một mặc định ngầm 0.0.0.0:80, việc thêm nó làm việc rõ ràng cho tôi. nghe ec2-xx-xx-xxx-xxx.us-west-1.compute.amazonaws.com:80; theo sau là chỉ thị server_name đã làm việc. – user1447121
Kiểm tra '/ etc/nginx/sites-available/' được liên kết với '/ etc/nginx/sites-enabled/'. Các tệp bổ sung tại đây có thể chứa cấu hình trùng lặp hoặc xung đột. –
hanxue