ServerRoot "/usr/local/apache2"

#apache安裝目錄
Listen 80
#服務(wù)器監(jiān)聽(tīng)端口
LoadModule
#模塊,可根據(jù)自身需求添加各式模塊
user www
group www
#服務(wù)執(zhí)行所屬用戶和所屬組
ServerAdmin web@test.com
#網(wǎng)站故障指示聯(lián)系郵箱
Require all denied
#默認(rèn)禁止所有,Require all granted為默認(rèn)允許所有
<IfModule mime_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>
#<IfModule> 里添加php支持參數(shù)
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
#Directoryindex添加php默認(rèn)支持參數(shù)
<VirtualHost *:80>
#虛擬主機(jī)配置開(kāi)始
DocumentRoot "/www/wwwroot/www.test.com"
#網(wǎng)站目錄根路徑
ServerName www.test.com
#網(wǎng)站名稱(chēng)
ServerAlias www.test.com test.com
#網(wǎng)站訪問(wèn)域名
ErrorLog "/www/wwwlogs/www.test.com-error_log"
#網(wǎng)站訪問(wèn)錯(cuò)誤日志
CustomLog "/www/wwwlogs/www.test.com-access_log" combined
#網(wǎng)站訪問(wèn)事務(wù)日志
#PATH
<Directory "/www/wwwroot/www.test.com">
SetOutputFilter DEFLATE
Options FollowSymLinks
#Options [選項(xiàng)]
#【選項(xiàng)1】:all,開(kāi)啟除去MultiViews之外所有選項(xiàng)
#【選項(xiàng)2】:ExecCGI,允許執(zhí)行Options知道目錄下所有CGI腳本
#【選項(xiàng)3】:FollowSymlinks,允許Options目錄下找不到DirectoryIndex指定的首頁(yè)
#【選項(xiàng)4】:Indexes,如果【選項(xiàng)3】成立,把當(dāng)前目錄下所有文件索引出來(lái)
AllowOverride None
#設(shè)置為 all 時(shí) .htaccess作為配置文件,設(shè)置為 None 時(shí), .htaccess 文件將被完全忽略
Order allow,deny
Allow from all
#默認(rèn)訪問(wèn)狀態(tài)優(yōu)先級(jí)(從左至右),allow允許,deny拒絕,all可替換為IP
DirectoryIndex index.html index.htm index.php default.php default.html default.htm
#默認(rèn)文檔訪問(wèn)優(yōu)先級(jí)
</Directory>
</VirtualHost>
#虛擬主機(jī)配置結(jié)束
網(wǎng)頁(yè)題目:服務(wù)器篇04-配置apache配置參數(shù)
轉(zhuǎn)載源于:http://chinadenli.net/article2/cpccic.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、虛擬主機(jī)、品牌網(wǎng)站設(shè)計(jì)、手機(jī)網(wǎng)站建設(shè)、品牌網(wǎng)站建設(shè)、Google
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)