AppServ設定虛擬機器主機 及網域名稱串連

來源:互聯網
上載者:User

標籤:http   檔案   os   art   html   for   

1: 安裝好AppServ2.5.9軟體,官網是:http://www.appservnetwork.com/ ,2.59是:http://nchc.dl.sourceforge.net/sourceforge/appserv/appserv-win32-2.5.9.exe 是英文軟體,但是安裝時可以選擇gbk-gb2312的編碼。  

  2: 修改原生hosts檔案,如下: C:\WINDOWS\system32\drivers\etc\hosts 

  樣本:

  127.0.0.1       localhost

  127.0.0.1       www.phpcms.com   

  

  3: 開啟appserv的安裝目錄,找到httpd.conf檔案,分別去掉下面兩行文字前面的#號。  

  #LoadModule vhost_alias_module modules/mod_vhost_alias.so   

  去掉#意思是啟用apache的虛擬機器主機功能。  

  

  #Include conf/extra/httpd-vhosts.conf  

  去掉這一行的#意思是從conf/extra/httpd-vhosts.conf這個檔案匯入虛擬機器主機配置。

  

  4: 開啟extra目錄內的httpd-vhosts.conf檔案,什麼都不管,直接在檔案底部加入自己要加的虛擬機器主機的資訊。如下面所示。   

   分別是給出一個管理員郵箱、指出此網站的根目錄、網域名稱、和錯誤記錄檔存放位置。注意目錄間隔最好用/而不是\ 。    

                     

<VirtualHost *:80>

         ServerAdmin [email protected]

         DocumentRoot E:/AppServ259/www/phpcms

         ServerName www.phpcms.com

         ErrorLog E:/AppServ259/www/dede/error.log

         CustomLog logs/dummy-host2.appservnetwork.com-access_log common

</VirtualHost>        

  

  *以上路徑中的斜線左斜右斜都可以。    

   

  5: 將appserv的apache服務重啟,就可以了,可以在各網站的根目錄下放一個index.html檔案,如果能看到,說明就對了。

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.