Linux+Apache+PHP+MySQL服务器环境配置(CentOS篇)

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
posted @ 2018-07-15 22:18  千秋伟业  阅读(407)  评论(0编辑  收藏  举报