企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 如何禁用IP访问,防止恶意解析 ------------------------------------------------ 1. 给指定网站程序设置域名([设置域名](depolyment.html)) 2. 将一下内容加入 `/etc/httpd/conf/httpd.conf` 的末尾或者在 `/etc/httpd/conf.d/` 目录下新建一个 `deny-ip.conf`的文件将内容写入 ``` <VirtualHost *:80> ServerName 服务器IP地址 <Location /> Order Allow,Deny Deny from all </Location> </VirtualHost> <VirtualHost *:443> ServerName 服务器IP地址 SSLEngine on SSLCertificateFile /etc/pki/tls/certs/localhost.crt SSLCertificateKeyFile /etc/pki/tls/private/localhost.key <Location /> Order Allow,Deny Deny from all </Location> </VirtualHost> ``` 3. 重启 apache `systemctl restart httpd`