标签归档:apache

apache

Centos7下安装配置Apache

yum -yinstall httpd

rpm -qi httpd

然后修改配置

cd /etc/httpd/conf

ls

vi httpd.conf

//查看配置文件,我们修改下root目录的配置:
DocumentRoot “/var/www/html”

//设置为自动启动
# systemctl enable httpd.service
ln -s’/usr/lib/systemd/system/httpd.service’ ‘/etc/systemd/system/multi-user.target.wants/httpd.service’
//在centos7中chkconfig httpd on 被替换成 systemctl enable httpd