woff 發表於 2010-5-18 15:37:09

Apache 安裝設定教學

官方網站: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"
<Directory />
Options None   
AllowOverride FileInfo   
Order allow,deny   
Allow from all
</Directory>
另外,建議以<Directory與</Directory>為關鍵字,搜尋並將不相關的目錄設定標記起來,使其沒有作用。

[*]索引頁檔名設定
設定說明:


[*]依次以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
<ifmodule mod_deflate.c>DeflateCompressionLevel 9
AddOutputFilterByType DEFLATE text/html text/xml text/css application/x-httpd-php
AddOutputFilter DEFLATE html htm xml php css</ifmodule>

car0597 發表於 2010-7-23 09:35:28

大大你好
謝謝你的分享這個軟體
我也很想自己做一個網站
但是我下載回來的資料都無法安裝
也無法開啟
請問要怎麼用阿?

woff 發表於 2010-7-23 11:11:39

請問你安裝出現了甚麼訊息呢?

還有你是用甚麼平台軟體架設網頁套件

架設這套件需要APACHE+MYSQL元件喔

榮宗 發表於 2011-9-15 00:41:46

頂你一下.

天气不错uk 發表於 2012-10-7 02:11:55

以后真的注意了。。。 楼主真好











static/image/common/sigline.gif
http://b111.photo.store.qq.com/psb?/V12Sxvtt4ECUeA/P4TymOWhW.z1HNwIMl256HTUh9BMQx8KcP3Wygo6pFk!/b/dBQROkIkBAAA&bo=nQGYAAAAAAABACM!

dngjv 發表於 2015-7-30 09:41:15

超值强帖,帮你顶,^_^











static/image/common/sigline.gif
步步生莲
頁: [1]
查看完整版本: Apache 安裝設定教學