My testing BLOG web site installed on win7 platform, also function as backup site.
我的BLOG在WIN7工作站上,還架了一個測試站台,另有備份功能
I installed WAMP on win7, but production server was installed on LINUX. It’s no impact on the BLOG service I provided between each other.
WIN7上裝的是WAMP, 但BLOG是架在LINUX上的,但這其實沒有什麼影響
To edit the file of httpd-vhosts.conf in the directory of C:wampbinapacheApache2.2.21confextra
在目錄C:wampbinapacheApache2.2.21confextra下,編輯httpd-vhosts.conf
< VirtualHost *:80 >
ServerAdmin webmaster@urcloud.biz
DocumentRoot “c:/vhosts/blog”
ServerName blog.urcloud.biz
ErrorLog “logs/blog.urcloud.biz-error.log”
CustomLog “logs/blog.urcloud.biz-access.log” common
< /VirtualHost >
< VirtualHost *:80>
ServerAdmin webmaster@urcloud.biz
DocumentRoot “E:/LAB/phpcs5”
ServerName phpcs5
ErrorLog “logs/phpcs5-error.log”
CustomLog “logs/phpcs5-access.log” common
< /VirtualHost>
APACHE上(httpd.conf)
增加虛擬目錄的實體路徑上去
after completing the setting as above, you need to add the physical directory of virtual host on the configuration file of APACHE (httpd.conf)
< Directory C:/vhosts>
Order Deny,Allow
Allow from all
< /Directory>
< Directory "e:/lab/phpcs5">
Order Deny,Allow
Allow from all
< /Directory>
And then, remember to enable the setting of virtual server on APACHE.
把虛擬主機的設定打開
# Virtual hosts
Include conf/extra/httpd-vhosts.conf <---把#號刪除掉 (to delete the #)
It's done, very simple.
大致上這樣,就能把虛擬主機的設定搞定囉..很簡單