多站點虛擬主機配置
阿新 • • 發佈:2019-04-26
位置 window 覆蓋 ons ted pan window系統 ont 初始
1. 默認的初始站點配置
apache安裝後,有一個默認站點,其配置都在apache的主配置文件(apache/conf/http.conf)中。
主要包括如下幾項:
1. 站點域名:
ServerName localhost 域名是可以設置的!
2. 站點位置(文件夾位置)
DocumentRoot H:\amp\Apache\htdocs 站點位置是可以設置的
3. 站點文件夾的訪問權限設置:
如下形式:
<Directory "要設置權限的文件夾路徑">
Options 設置項
AllowOverride 設置項
Require 權限設置項
</Directory>
名詞解釋如下:
Options : 用於設置一些系統選項,通常window系統中就用Indexes就可以了
AllowOverride All //表示可覆蓋 AllowOverride Node //表示不可覆蓋
Require: 用於設置可訪問權限 Require All granted Require All denied(網站關閉使用)
4. 站點默認顯示的網頁
DirectoryIndex index.php index.html
默認網頁(首頁)是可以設置的
5.1.1 網站域名的設置
多站點虛擬主機配置