当我尝试仅通过端口 80 上的 IP 访问我的服务器时遇到问题。
如果我访问该 IP,我会收到 nginx 404 错误页面。
这是我的默认配置:
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
# Document root
root /var/www/default;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
# First attempt to …
Run Code Online (Sandbox Code Playgroud) nginx ×1