2013年8月24日 星期六

Apache Virtual Host 設定 foe CentOS 6.4

先看  /etc/httpd/conf.d/  下有沒有 vhost.conf   有的話直接開啟 , 若無的話則自已建一個內容如下

NameVirtualHost *:80

<VirtualHost *:80>
 #設定 DocumentRoot
 DocumentRoot /var/www/html/www
 #設定所對應的 網址
 ServerName www.bearxxx.idv.tw
</VirtualHost>
 
<VirtualHost *:80>
 #設定 DocumentRoot
 DocumentRoot /var/www/html/mail
 #設定所對應的 網址
 ServerName mail.bearxxx.idv.tw
</VirtualHost

最後別忘了重啟apache
# service httpd restart 

沒有留言:

張貼留言