1. 程式人生 > >Windows平臺下載、安裝、配置Apache全攻略

Windows平臺下載、安裝、配置Apache全攻略

郵件地址 director fig ons min least chang 修改 all

本文介紹了如何在windows平臺進行apache服務器的下載、安裝和配置過程。

1.下載

首先進入apache for windows的官方下載地址[猛戳這裏],依次在下列頁面進行下載操作:

技術分享圖片

技術分享圖片

技術分享圖片

我這裏下載的安裝包名稱為:httpd-2.4.18-x64-vc11-r2.zip。

2.安裝

將下載好的文件解壓到磁盤目錄下,比如:D:\Programs\Apache24,然後接下來進行配置工作。

3.配置

進入D:\Programs\Apache24\conf目錄,找到httpd.conf文件,進行如下配置工作:

1)修改Apache程序的位置

將SRVROOT修改為你具體放置的位置,具體如下:

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#

Define SRVROOT "D:/Programs/Apache24"
ServerRoot "${SRVROOT}"

2)修改email地址

ServerAdmin的email修改為你的郵件地址

ServerAdmin [email protected]

3)修改域名

將ServerName修改為你自己的域名

ServerName www.iwwenbo.com:80

4)修改網站根目錄

將DocumentRoot修改為你自己的目錄位置

DocumentRoot "${SRVROOT}/htdocs"

4.啟動

打開cmd窗口,進入apache的bin目錄,執行如下圖所示命令,進行服務安裝:>>>閱讀全文

Windows平臺下載、安裝、配置Apache全攻略