Apache配置文件详解

来源:互联网 发布:怎么做好淘宝手机端 编辑:程序博客网 时间:2024/05/29 19:29

apache安装目录

ServerRoot "/usr/local/apache2/"

apache默认监听的端口

Listen 80

加载模块

LoadModule authn_file_module modules/mod_authn_file.so

apache重写模块,可以配置伪静态

LoadModule rewrite_module modules/mod_rewrite.so

管理apache的用户

User daemon

管理员的邮箱

ServerAdmin you@zbo1.com

域名

ServerName www.zbo1.com:80

apache默认的根目录

DocumentRoot "/usr/local/apache2/htdocs"

Indexes 是否显示列表页

Options Indexes FollowSymLinks

.htaccess文件是否生效的开关 None不生效 All生效

AllowOverride None

访问控制,可以让某些ip访问不到你的服务器

granted  所有人都可以访问denied   所有人都访问不了Require all granted

apache起始搜索页

DirectoryIndex index.html index.php

让子配置生效

Include etc//extra/httpd-autoindex.conf
原创粉丝点击