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