NGINX-启用站点的文件未处于活动状态

NGINX-启用站点的文件未处于活动状态,nginx,Nginx,nginx提供的index.html文件来自/usr/share/nginx/html,而不是来自/usr/share/nginx/html2,该文件在我的站点启用/www virutal主机文件中显示。我担心的是我的站点启用/www文件未处于活动状态 在我的nginx.conf http块中,我有以下内容: include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; listen 80 default_serve

nginx提供的index.html文件来自/usr/share/nginx/html,而不是来自/usr/share/nginx/html2,该文件在我的站点启用/www virutal主机文件中显示。我担心的是我的站点启用/www文件未处于活动状态

在我的nginx.conf http块中,我有以下内容:

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name *.my_host_name.com;
root /usr/share/nginx/html2;
index index.html index.htm
在我的/etc/nginx/sites enabled/www文件中,我有以下内容:

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name *.my_host_name.com;
root /usr/share/nginx/html2;
index index.html index.htm

你知道为什么nginx仍然从/usr/share/nginx/html文件夹而不是上面设置中的/usr/share/nginx/html2文件夹中提供index.html文件吗?

尝试删除文件
/etc/nginx/sites enabled/default
中的
listen
行中的单词
default
为什么“ipv6only=on”?是否会禁用在ipv4上可查看的站点?