一,安装Apache
yum install httpd -y,安装apache,版本为2.4.6,最新为2.4.9。
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak;
vim /etc/httpd/conf/httpd.conf (默认唯一)
端口改为8000,不能与Nginx重叠。
<VirtualHost *:8000>
DocumentRoot "/home/admin/tp5/public"
ServerName 007.liangyishipin.com:8000
<Directory "/home/admin/tp5">
Options FollowSymLinks Indexes
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
systemctl start httpd,启动httpd.
systemctl enable httpd,设置httpd服务开机启动.
systemctl disable httpd.service 停止开机自启动
systemctl status httpd,查看服务状态.