apache server 配置虛擬主機

1.將httpd.conf中Include conf/extra/httpd-vhosts.conf去掉註釋

2.在httpd-vhosts.conf中添加
<VirtualHost *:8080>   
ServerAdmin xxx@ xxx.com
ServerName  xxx.com
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目錄下的錯誤日誌找出問題所在
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章