【已完成】怎么给网站添加IPv6地址
本帖最后由 堡塔运维香菜卷 于 2023-10-9 14:38 编辑怎么给网站添加IPv6地址,搜索到的办法说是改配置文件,我的配置文件怎么没有那些条目啊
您好,默认情况下,nginx的编译安装脚本中已经添加了IPv6扩展,如果您已经编译安装过,这样您新建的网站会增加ipv6的监听配置. <VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot "D:/WWW/ansteelcn"
ServerAlias abri.ansteel.cn
ErrorLog "D:/BtSoft/wwwlogs/127.0.0.1-error.log"
CustomLog "D:/BtSoft/wwwlogs/127.0.0.1-access.log" combined
#HTTP_TO_HTTPS_START
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}$1
</IfModule>
#HTTP_TO_HTTPS_END
#SECURITY-START 防盗链配置
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !abri.ansteel.cn
RewriteRule .(jpg|jpeg|gif|png|js|css) /404.html
#SECURITY-END
#redirect 重定向
IncludeOptional conf/redirect/127.0.0.1/*.conf
#proxy 反向代理
IncludeOptional conf/proxy/127.0.0.1/*.conf
ErrorDocument 404 /404.html
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PHP
Include conf/php/74.conf
#PATH
<Directory "D:/WWW/ansteelcn">
Options FollowSymLinks ExecCGI
AllowOverride All
Require all granted
DirectoryIndex index.php default.php index.html index.htm default.html default.htm
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@example.com
DocumentRoot "D:/WWW/ansteelcn"
ServerAlias abri.ansteel.cn
ErrorLog "D:/BtSoft/wwwlogs/127.0.0.1-error.log"
CustomLog "D:/BtSoft/wwwlogs/127.0.0.1-access.log" combined
#redirect 重定向
IncludeOptional conf/redirect/127.0.0.1/*.conf
#proxy 反向代理
IncludeOptional conf/proxy/127.0.0.1/*.conf
ErrorDocument 404 /404.html
#SSL
SSLEngine On
SSLCertificateFile conf/ssl/127.0.0.1/fullchain.pem
SSLCertificateKeyFile conf/ssl/127.0.0.1/privkey.pem
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
#DENY FILES
<Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
Order allow,deny
Deny from all
</Files>
#PHP
Include conf/php/74.conf
#PATH
<Directory "D:/WWW/ansteelcn">
Options FollowSymLinks ExecCGI
AllowOverride All
Require all granted
DirectoryIndex index.php default.php index.html index.htm default.html default.htm
</Directory>
</VirtualHost> 我的配置文件中只有这些 您好,请问您的问题解决了吗?没有解决的话麻烦重新发帖以便处理。 你好,我添加了ipv6监听后,从【服务器IPV6地址】:端口,还是不能访问,不是是什么原因?
页:
[1]