The AppServ Open Project - 2.4.4a for Windows
昇級你的 MySQL 4.1 或5.0 經過測試可以用
(為什麼我要昇級,好像不昇原本Appserv內的MySQL支援utf8會有問題,因為過了一個月我也記不清礎為什麼要昇級,好像是這個原因)
編輯你的 C:\AppServ\apache\conf\httpd.conf
找到下面這兩行把最前面#去掉
代碼:
LoadModule vhost_alias_module libexec/mod_vhost_alias.so
AddModule mod_vhost_alias.c
在最下面加入
代碼:
NameVirtualHost 192.168.0.2
<VirtualHost 192.168.0.2>
ServerAdmin webgirl@xxxx.com.tw
DocumentRoot c:/AppServ/www
ServerName 192.168.0.2
ErrorLog logs/192.168.0.2_log
CustomLog logs/192.168.0.2_log common
</VirtualHost>
<VirtualHost 192.168.0.2>
ServerAdmin webgirl@aaaa.com.tw
DocumentRoot c:/AppServ/www/1234
ServerName www.aaaa.com.tw
ErrorLog logs/www.aaaa.com.tw_log
CustomLog logs/www.aaaa.com.tw-access_log common
</VirtualHost>
<VirtualHost 192.168.0.2>
ServerAdmin webguy@aaaa.com.tw
DocumentRoot c:/AppServ/www/vbb35
ServerName vb35.aaaa.com.tw
ErrorLog logs/vb35.aaaa.com.tw_log
CustomLog logs/vb35.aaaa.com.tw-access_log common
</VirtualHost>
<VirtualHost 192.168.0.2>
ServerAdmin webguy@aaaa.com.tw
DocumentRoot c:/AppServ/www/xoops2
ServerName xoops2.aaaa.com.tw
ErrorLog logs/xoops2.aaaa.com.tw_log
CustomLog logs/xoops2.aaaa.com.tw-access_log common
</VirtualHost>
<VirtualHost 192.168.0.2>
ServerAdmin webguy@aaaa.com.tw
DocumentRoot c:/AppServ/www/4images
ServerName images.aaaa.com.tw
ErrorLog logs/images.aaaa.com.tw_log
CustomLog logs/images.aaaa.com.tw-access_log common
</VirtualHost>
<VirtualHost 192.168.0.2>
ServerAdmin webguy@aaaa.com.tw
DocumentRoot c:/AppServ/www/phpbb2
ServerName phpbb.thetango.com.tw
ErrorLog logs/phpbb.thetango.com.tw_log
CustomLog logs/phpbb.thetango.com.tw-access_log common
</VirtualHost>
<VirtualHost 192.168.0.2>
ServerAdmin webguy@bbbb.com.tw
DocumentRoot c:/AppServ/www/kodakqa
ServerName mykd.bbbb.com.tw
ErrorLog logs/my.bbbb.com.tw_log
CustomLog logs/my.bbbb.com.tw-access_log common
</VirtualHost>
記得要再你的DNS Server 加上一個 A 記錄 或是一個別名
說明一下
aaaa.com.tw 如果這是你請的網址
你的DNS 加入一個 www別名 那以後用
www.aaaa.com.tw 來訪問你的網址
apache 會用 c:/AppServ/www/1234 來當你網址的根目錄
加入一個 xoops2的 位置或別名
xoops2.aaaa.com.tw 來訪問你的網址
apache 會用c:/AppServ/www/xoops2 來當你網址的根目錄
記得要重新啟動你的apach (不是重開機)