• Apache 伺服器安裝教學
  • 推文至Facebook  
  • 官方網站:http://www.apache.org/
    實作版本下載點:http://www.apache.org/dyn/closer.cgi
    功能:功能強大、佔有率最高的 HTTP 伺服器軟體。


    安裝步驟 下載並執行 apache 安裝精靈起始(Installation Wizard)畫面:

    直接按 Next。

     

    使用許可協議(License Agreement)畫面:

    點選 I accept the terms in the license agreement

    按 Next。

     

    讀我檔案(Read This First)畫面:

    直接按 Next。

    設定安裝資料夾 ,如D:\www

     

     

    伺服器資訊設定(Server Information)畫面:

    Network Domain 與 Server Name 請依照實際情況填寫,若不知道可填 localhost。

    Administrator's Email Address 則是填自己的 Email 信箱。

    按 Next。

     

    安裝類型選擇(Setup Type)畫面:

    按 Next。

    設定MYSQL密碼畫面:

    輸入密碼

    直接按 Next。

     

    安裝確認(Ready to Install the Program)畫面:

    直接按 Install。

    安裝完成(Installation Wizard Completed)畫面:

    按 Finish。

    安裝成功。

     

     

    設定步驟
    可將右下角小時鐘旁的Apache Monitor小圖示關閉,不影響伺服器運作。httpd.conf 設定
    用記事本開啟 C:\Program Files\Apache Group\Apache2\conf\httpd.conf,並按照以下原則進行修改。
    請自行以關鍵字尋找並取代預設設定,若沒有預設設定則新增在檔案最後面即可。
    強調的部分請依實際情況修改。
    請注意斜線(/)與反斜線(\)的不同,以免造成不必要的錯誤。
    設定完成後必須重新啟動伺服器以套用新的設定。 網頁目錄及權限設定
    設定說明: 以 D:\www 目錄作為網頁存放路徑。 若目錄中沒有索引頁(index.html等),則傳回 403 Forbidden,不會列出目錄中檔案。

    DocumentRoot "D:/www"
     
     Options None   
     AllowOverride FileInfo   
     Order allow,deny   
     Allow from all

     


    另外,建議以與為關鍵字,搜尋並將不相關的目錄設定標記起來,使其沒有作用。 索引頁檔名設定
    設定說明: 依次以index.html與index.xml為首頁檔名。

    DirectoryIndex index.html index.xml

     

    錯誤頁面設定
    設定說明: 在發生 403 Forbidden 與 404 Not Found 時,以 /error/*error.php 的內容取代錯誤訊息。 ErrorDocument 403 /error/403error.phpErrorDocument 404 /error/404error.php 使用 mod_deflate 增進傳輸效能設定
    設定說明: 在瀏覽器可以接受的情況下,傳送壓縮過的內容以增進傳輸效率,但會增加伺服器負擔。 DeflateCompressionLevel 設定壓縮等級。 AddOutputFilterByType 根據 MIME Type 設定要壓縮的檔案類型 AddOutputFilter 根據副檔名設定要壓縮的檔案類型。

     LoadModule deflate_module modules/mod_deflate.so
     DeflateCompressionLevel 9
     AddOutputFilterByType DEFLATE text/html text/xml text/css application/x-httpd-php
     AddOutputFilter DEFLATE html htm xml php css

    新竹網頁設計,竹北網頁設計,竹南網頁設計,中壢網頁設計,網頁設計,免費模板,免費網頁套件,架設網站,網站架設 ,修改模板,主機代管,Android App

  • 標籤:NetYea, RWD, 可適應式網站, Apache,
NetYea 客服 NetYea 客服
NetYea 客服

Apache 伺服器安裝教學 -