天天看點

apache server 配置虛拟主機

1.将httpd.conf中Include conf/extra/httpd-vhosts.conf去掉注釋

2.在httpd-vhosts.conf中添加

<VirtualHost *:8080>   

ServerAdmin xxx@

xxx.com

ServerName 

DocumentRoot "D:/xxx"

    ErrorLog "logs/xxx_log"

    CustomLog "logs/xxx_access_log" combined

    <Directory "D:/xxx">

Options Indexes FollowSymLinks

AllowOverride All

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

PS:出現錯誤時應檢視apache logs目錄下的錯誤日志找出問題所在