成都网站建设设计

将想法与焦点和您一起共享

服务器篇04-配置apache配置参数

ServerRoot "/usr/local/apache2"

长葛网站建设公司创新互联,长葛网站设计制作,有大型网站制作公司丰富经验。已为长葛上千提供企业网站建设服务。企业网站搭建\成都外贸网站制作要多少钱,请找那个售后服务好的长葛做网站的公司定做!

#apache安装目录

Listen 80

#服务器监听端口

LoadModule

#模块,可根据自身需求添加各式模块

user www

group www

#服务执行所属用户和所属组

ServerAdmin web@test.com

#网站故障指示联系邮箱

Require all denied

#默认禁止所有,Require all granted为默认允许所有

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

# 里添加php支持参数

DirectoryIndex index.html index.php

#Directoryindex添加php默认支持参数

#虚拟主机配置开始

DocumentRoot "/www/wwwroot/www.test.com"

#网站目录根路径

ServerName www.test.com

#网站名称

ServerAlias www.test.com test.com

#网站访问域名

ErrorLog "/www/wwwlogs/www.test.com-error_log"

#网站访问错误日志

CustomLog "/www/wwwlogs/www.test.com-access_log" combined

#网站访问事务日志

#PATH

SetOutputFilter DEFLATE

Options FollowSymLinks

#Options [选项]

#【选项1】:all,开启除去MultiViews之外所有选项

#【选项2】:ExecCGI,允许执行Options知道目录下所有CGI脚本

#【选项3】:FollowSymlinks,允许Options目录下找不到DirectoryIndex指定的首页

#【选项4】:Indexes,如果【选项3】成立,把当前目录下所有文件索引出来

AllowOverride None

#设置为 all 时 .htaccess作为配置文件,设置为 None 时, .htaccess 文件将被完全忽略

Order allow,deny

Allow from all

#默认访问状态优先级(从左至右),allow允许,deny拒绝,all可替换为IP

DirectoryIndex index.html index.htm index.php default.php default.html default.htm

#默认文档访问优先级

#虚拟主机配置结束


分享标题:服务器篇04-配置apache配置参数
分享链接:http://chengdu.cdxwcx.cn/article/cpccic.html