1.配置php.ini
vi /etc/php.ini
2.配置apache
先给需要配置的文件做个备份
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
编辑配置
vi /etc/httpd/conf/httpd.conf
配置完成后,启动apache服务
service httpd start
3.配置虚拟主机配置
vi /etc/httpd/conf/httpd.conf
在最后添加
<VirtualHost *:80>
ServerName 域名.com
ServerAlias www.域名.com
DocumentRoot /www/htdocs/demo
</VirtualHost>
重启apache
service httpd restart
原文地址:https://www.cnblogs.com/comeping/p/9315247.html
时间: 2024-10-10 23:12:00