Apache 2.4.6 禁止IP访问网站防恶意解析
防止网站被恶意解析,禁止IP直接访问,只允许域名访问
Apache版本
[root@localhost ~]# httpd -v Server version: Apache/2.4.6 (CentOS) Server built: Oct 19 2017 20:39:16
Apache禁止IP访问网站配置...
阅读全部防止网站被恶意解析,禁止IP直接访问,只允许域名访问
Apache版本
[root@localhost ~]# httpd -v Server version: Apache/2.4.6 (CentOS) Server built: Oct 19 2017 20:39:16
Apache禁止IP访问网站配置...
阅读全部配置apache支持.htaccess
AllowOverride All阅读全部
htpasswd参数
-c 创建passwdfile.如果passwdfile 已经存在,那么它会重新写入并删去原有内容. -n 不更新passwordfile,直接显示密码 -m 使用MD5加密(默认) -d 使用CRYPT加密(默认) -p 使用普通文本格式的密码 -s 使用SHA加密 -b 命令行中一并输入用户名和密码而不是根据提示输入密码,可以看见明文,不需要交互 -D 删除指定的用户阅读全部
1. 目录/etc/httpd/conf.d下新建vhosts.conf文件,内容如下
Listen 80 <VirtualHost *:80> DocumentRoot "/www" DirectoryIndex index.html index.php <Directory "/www"> Options -Indexes +FollowSymlinks AllowOverride All Require all granted </Directory> </VirtualHost>阅读全部
打开Apahce配置文件httpd.conf ,将配置文件里的
Options Indexes FollowSymLinks
改成
Options FollowSymLinks
重启apache服务,文件列表就关闭了。