標籤:apache
Apache HTTP Server是Apache軟體基金會的一個開放源碼的網頁伺服器,可以在大多數電腦作業系統中運行,由於其多平台和安全性被廣泛使用,是最流行的Web伺服器端軟體之一。它快速、可靠並且可通過簡單的API擴充,將Perl/Python等解譯器編譯到伺服器中。
一、下載
:http://www.apachehaus.com/cgi-bin/download.plx
二、配置
2.1 下載下來的zip尾碼的程式包,解壓出來,然後自訂名稱放在相應的位置上,我是在伺服器的D盤根目錄下,命名為:Apache22,即D:\Apache22\ ,該目錄下包含bin、conf、htdocs、lib等目錄及檔案;
2.2 配置環境變數,在系統變數path的末尾加入:;D:\Apache22\bin (注意是追加,不是覆蓋)
2.3 配置httpd.conf
編輯根程式目錄下conf/httpd.conf的檔案裡面的內容:
ServerRoot "d:\Apache22"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
註:我只簡單的更改其中的兩處,生產環境下,需要根據實際情況,進行相應的調整設定檔;
三、安裝
以管理員身份運行開始-運行-輸入cmd,進入DOS視窗後,首先切換到Apache的程式目錄:
C:\Users\Administrator>d:
D:\>cd Apache22\bin
D:\Apache22\bin>httpd -k install
D:\Apache22\bin>httpd -k start
Other Command line options:
Stop Apache httpd -k stop
Restart Apache httpd -k restart
Uninstall Apache Service httpd -k uninstall
Test Config Syntax httpd -t
Version Details httpd -V
Command Line Options List httpd -h
四、驗證
開啟瀏覽器,在地址欄輸入:http://localhost/ ,如果能正常開啟網站資訊,即說明已成功部署了。
本文出自 “方寸小山” 部落格,請務必保留此出處http://63638790.blog.51cto.com/513514/1643781
Apache for windows安裝配置之解壓縮版