nginx解决恶意解析及https窜站方法:https://www.zfcdn.xyz/showinfo-7-36231-0.html
宝塔设置方法可参考如图: 设置后会在 /www/server/panel/vhost/apache 目录生成 0.default.conf 文件。文件代码如下
请将 /www/server/apache/htdocs 更换为自己的真实目录,可以随便创建一个目录,在这个根目录下创建index.html 然后随便输入几个字符即可,比如404
调用的证书文件请在文章结尾下载。
若是手动搭建的环境,请在apache的httpd.conf 配置文件中添加上面代码,路径改成自己的路径即可。<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/www/server/apache/htdocs"
ServerName bt.default.com
<Directory "/www/server/apache/htdocs">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html
</Directory>
</VirtualHost>
#上面是禁止ip地址+http访问
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot "/www/server/apache/htdocs"
ServerName ssl.default.com
# DEFAULT SSL CONFIG
SSLEngine On
SSLCertificateFile /www/server/panel/vhost/cert/0.default/fullchain.pem
SSLCertificateKeyFile /www/server/panel/vhost/cert/0.default/privkey.pem
SSLCipherSuite EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5
SSLProtocol All -SSLv2 -SSLv3 -TLSv1
SSLHonorCipherOrder On
<Directory "/www/server/apache/htdocs">
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html
</Directory>
</VirtualHost>
添加后如图
文章评论 本文章有个评论