Apache HTTP Server是Apache軟件基金會的一個開放源碼的網頁服務器,能夠在大多數計算機操做系統中運行,因爲其多平臺和安全性被普遍使用,是最流行的Web服務器端軟件之一。它快速、可靠而且可經過簡單的API擴展,將Perl/Python等解釋器編譯到服務器中。apache
1、下載瀏覽器
下載地址:http://www.apachehaus.com/cgi-bin/download.plx安全
2、配置服務器
2.1 下載下來的zip後綴的程序包,解壓出來,而後自定義名稱放在相應的位置上,我是在服務器的D盤根目錄下,命名爲:Apache22,即D:\Apache22\ ,該目錄下包含bin、conf、htdocs、lib等目錄及文件;ide
2.2 配置環境變量,在系統變量path的末尾加入:;D:\Apache22\bin (注意是追加,不是覆蓋)網站
2.3 配置httpd.confspa
編輯根程序目錄下conf/httpd.conf的文件裏面的內容:操作系統
ServerRoot "d:\Apache22"rest
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>ip
注:我只簡單的更改其中的兩處,生產環境下,須要根據實際狀況,進行相應的調整配置文件;
3、安裝
以管理員身份運行開始-運行-輸入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
4、驗證
打開瀏覽器,在地址欄輸入:http://localhost/ ,若是能正常打開網站信息,即說明已成功部署了。