- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認(rèn)證網(wǎng)站身份V標(biāo)記
- 域名注冊服務(wù)機構(gòu)許可:滇D3-20230001
- 代理域名注冊服務(wù)機構(gòu):新網(wǎng)數(shù)碼
1.準(zhǔn)備安裝包
我從http://www.tjdsmy.cn/下載的安裝包httpd-2.4.23-win64-VC14.zip
2.解壓
我解壓在D盤,文件目錄如下
3.修改配置文件httpd.conf
修改Apache24->conf下的httpd.conf
①修改ServerRoot的根路徑:
將
ServerRoot "c:/Apache24"
改為
ServerRoot "d:/Apache24"
②修改ServerName你的主機名稱:
將
#ServerName www.tjdsmy.cn:80
改為
ServerName www.tjdsmy.cn:80
③修改DocumentRoot訪問的主文件夾目錄
將
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
?為
DocumentRoot "d:/www"
<Directory "d:/www">
我在D盤創(chuàng)建了名為www的文件夾,用于存放php應(yīng)用程序的,相當(dāng)于wamp集成開發(fā)環(huán)境中的www文件夾
④修改入口文件DirectoryIndex
將
DirectoryIndex index.html
改為
DirectoryIndex index.php index.html index.htm
⑤設(shè)定ScriptAlias的目錄:
將
ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"
改為
ScriptAlias /cgi-bin/ "d:/Apache24/cgi-bin/"
⑥修改CGI directory
將
<Directory "c:/Apache24/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
改為
<Directory "d:/Apache24/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
4.安裝Apache24服務(wù)
以管理員身份運行cmd,并切換到Apache24的bin目錄
輸入
httpd.exe -k install -n "Apache24"
cmd命令輸入services.msc
這時候httpd已經(jīng)篇日志完成。
5.測試Apache
打開Apache24服務(wù),將Apache24下htdocs中的index.html文件復(fù)制到www目錄下。
打開瀏覽器,在地址欄中輸入localhost/index.html回車
這是Apache服務(wù)器配置完成。
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP