1.配置php.iniphp
vi /etc/php.iniapache
2.配置apacherest
先給須要配置的文件作個備份域名
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