APACHE2.X 禁止服务器IP直接访问
来源:互联网 发布:spring源码视频百度云 编辑:程序博客网 时间:2024/05/21 08:12
网上参考一坨配制没啥效果。编辑APACHE配制文件一般在/etc/httpd/conf/httpd.conf; 先把默认的DocumentRoot给注释掉,在文件最后添加如内容,保存并重启service httpd restart (centos7.x 使用systemctl restart httpd) #域名替换自己的,IP替换成公网IP就行。
<VirtualHost mysite.com:80> ServerName mysite.com ServerAlias www.mysite.com DocumentRoot /home/rotate/public_html ServerAdmin me@mysite.com UseCanonicalName Off</VirtualHost>NameVirtualHost mysite.com:80<VirtualHost 192.168.1.1:80> ServerName 192.168.1.1 Redirect 403 / ErrorDocument 403 "Sorry, direct IP access not allowed." DocumentRoot /usr/local/apache/htdocs ServerAdmin me@mysite.com UseCanonicalName Off UserDir disabled</VirtualHost><VirtualHost *> ServerName server.mysite.com DocumentRoot /usr/local/apache/htdocs ServerAdmin me@mysite.com UserDir disabled</VirtualHost>
0 0
- APACHE2.X 禁止服务器IP直接访问
- 禁止ip直接访问
- nginx 禁止直接访问IP
- nginx禁止直接通过IP地址访问
- Nginx 禁止直接使用IP或未绑定的域名访问Web服务器
- 我的服务器开发之路-nginx禁止使用ip地址直接访问
- nginx禁止IP直接访问可能禁止非本…
- 服务器禁止某IP进行访问
- linux下appach服务器禁止ip访问
- Linux 禁止某个IP访问服务器
- Linux 禁止某个ip访问服务器
- web服务禁止 ip 直接访问: apache/httpd/nginx
- 防止恶意解析 - 禁止通过ip直接访问到网站
- 如何禁止直接用IP访问IIS中的网站
- web安全tomcat tomcat禁止ip直接访问
- wordpress优化禁止直接通过ip访问防止恶意解析
- apache2.4.X服务器配置让所有终端访问
- Linux通过防火墙iptables禁止指定IP访问服务器
- 多线程
- 我自己的noip复习(实时更新)
- 【Python】virtualenv —— 建立Python虚拟环境
- 算法题:剔除字符串(很有意思)
- python爬虫 爬取淘女郎介绍以及照片
- APACHE2.X 禁止服务器IP直接访问
- 生活灵感汇总
- Azure WEBsite 的跨站点高可用(上海数据中心-北京数据中心)
- spoj K-th Number (classic! 区间静态第k大)
- HDU1950-Bridging signals-最长上升子序列
- LeetCode中的DataBase面试题
- spring webService调用过程service与mapper出现NullPointException
- Javascript Promises Are Awesome
- 【SRM664-2】【BearPlaysDiv2】