yum安装的apache默认配置文件路径
主配置文件httpd.conf参数
apache默认网站目录/var/www/html
一、更改默认目录
1、创建目录
mkdir /home/wwwroot
2、修改配置文件 /etc/httpd/conf/httpd.conf
113 DocumentRoot "/home/wwwroot"
<Directory "/home/wwwroot">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
3、关闭selinux
关闭iptables systemctl stop firewalld.service
4、重启httpd服务
二、个人主页功能
1、更改配置文件/etc/httpd/conf.d/userdir.conf
17 # UserDir disabled
#
# To enable requests to /~user/ to serve the user's public_html