單站點(diǎn)配置
一個(gè)站點(diǎn)的兩個(gè)核心信息為:
- ServerNmae:主機(jī)名(服務(wù)器名/站點(diǎn)名)
- DocumentRoot:站點(diǎn)位置(站點(diǎn)目錄路徑/實(shí)際物理路徑)
目錄訪問權(quán)限設(shè)置
- require local
- DirectoryIndex:設(shè)置該文件夾下的默認(rèn)首頁,可以設(shè)置多個(gè),用于請(qǐng)求中不帶文件名時(shí)自動(dòng)使用該文件作為返回頁面
- Deny
虛擬主機(jī)配置
//測(cè)試專用虛擬主機(jī)配置
<VirtualHost *:80>
????DocumentRoot "H:/site/test/"
????ServerName www.test.com
????<Directory "H:/site/test/">
????????Options Indexes FollowSymLinks
????????AllowOverride all
????????Require local
????</Directory>
</VirtualHost>
核心觀點(diǎn)
- 站點(diǎn)就是文件夾