***************
自己設置最小的 httpd.conf
Listen 80
DocumentRoot "S:/ApacheTest/httpdocs"
***************
詳細內容
接着上面,在xp下安裝apache來說
使用網絡安裝後
httpd.exe應該在安裝目錄在bin目錄下
如:D:/Servers/Apache Software Foundation/Apache2.2 for Test/bin
現在需要
自己來建立一個 apache 配置文件
1、首先選一個目錄作爲服務器根
如: S:/ApacheTest
2、建立相關目錄
logs 放日誌
conf 放配置
httpdoc 放html文檔, 建一個index.html文件 內容
<html><body><h1>It works (mine conf) !</h1></body></html>
3、在服務器根目錄下建立 httpd.exe 的快捷方式
後面跟參數 -w -d s:/ApacheTest
這個參數 -d 的意思是 指定服務器根目錄爲 S:/ApacheTest
或者
讓httpd 在搜索路徑 path
set path="D:/Servers/Apache Software Foundation/Apache2.2 for Test/bin/"
httpd -w -d S:/apacheTest
4、在conf裏建立 httpd.conf
內容
ServerRoot "S:/ApacheTest"
Listen 80
ServerName 127.0.0.1
DocumentRoot "S:/ApacheTest/httpdocs"
5、運行ok
Apache 自己設置conf之最小化的conf
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.