一、默认配置文件

# 定义apache运行的目录,即程序所在的位置
ServerRoot "/usr/local/apache2"
# 定义Apache服务监听的端口
Listen 80
# 启动Apache时加载的模块
LoadModule php5_module modules/libphp5.so
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User daemon
Group daemon
</IfModule>
</IfModule>
# 管理员邮箱的地址
ServerAdmin you@example.com
# Apache监督的ip/域名:端口号
ServerName 127.0.0.1:80
# html文件(即项目文件)存放的路径
DocumentRoot "/usr/local/apache2/htdocs"
# 对根目录的限制
<Directory />
# 禁止显示Apache目录列表
Options FollowSymLinks
# 禁止用户对目录配置文件(.htaccess)重载
AllowOverride None
# 配置allow和deny的顺序,默认只有最后一个关键字起作用
Order deny,allow
# 拒绝所有访问
Deny from all
</Directory>
<Directory "/usr/local/apache2/htdocs">
# 禁止显示htdoc下的文件列表,如果htdoc下面没有可以发达的文件,会显示静止访问根
Options FollowSymLinks
# 跟下没有index.html等页面,会显示跟下的文件名
#Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
# 首页文件 可以写多个
DirectoryIndex index.html index.php
</IfModule> #阻止.htaccess 和 .htpasswd等重要文件被web用户查看
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
# 错误日志的路径
ErrorLog "logs/error_log"
# 错误日志的级别
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
# 访问日志存放路径
CustomLog "logs/access_log" common
</IfModule>
# cgi的配置
#<IfModule alias_module>
# ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
#</IfModule>
#<IfModule cgid_module>
#</IfModule>
#<Directory "/usr/local/apache2/cgi-bin">
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
#</Directory>
DefaultType text/plain
# 允许传送时使用以下几种压缩方式
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# 参考网上各类资源整理

Apache之默认配置文件解释的更多相关文章

  1. nginx默认配置文件解释

    nginx默认配置文件 nginx.conf 介绍: 全局配置 user  nginx; 设置nginx服务的系统使用用户 worker_processes  1; 工作进程数(建议和CPU核心数保持 ...

  2. Apache httpd.conf配置文件主要内容解释

    1 ServerRoot 配置 ["ServerRoot" 主要用于指定Apache的安装路径,此选项参数值在安装Apache时系统会自动把Apache的路径写入.Windows安 ...

  3. 【转】Apache httpd.conf配置解释

    转自:http://jafy00.blog.51cto.com/2594646/501373 常用配置指令说明 1. ServerRoot:服务器的基础目录,一般来说它将包含conf/和logs/子目 ...

  4. Apache httpd.conf配置文件 1(Global Environment )

    Apache 版本: Server version: Apache/2.2.15 总计 1000行左右 英文前带井号的是注释,不起作用. 但很多注释去掉前方的  #  即可生效. # # This i ...

  5. Apache httpd.conf配置文件 2(Main server configuration)

    ### Section 2: 'Main' server configuration # # The directives in this section set up the values used ...

  6. struts2默认配置文件 struts-default.xml

    注:用的struts2的版本是2.1.6 strtus2的默认配置文件 struts-default.xml ,其中的默认的拦截器,包括其中的拦截器栈. 因为struts2的配置文件struts.xm ...

  7. Apache服务器配置默认首页文件名和网站路径

    默认首页的配置: 第一种:直接修改apache服务器的配置文件./conf/httpd.conf中的DirectoryIndex,如:(项目web以index.php为首页) <IfModule ...

  8. php配置虚拟主机的配置步骤(hosts、httpd.conf、vhosts.conf)1.配置本地的dns文件2.配置apache的主配置文件3.配置Apache的虚拟主机

    1.域名解析(DNS) 找到C:\Windows\System32\drivers\etc目录下的hosts文件,在里面进行添加对应的内容

  9. redis的配置文件解释

    redis的守护进行 守护进程(Daemon Process),也就是通常说的 Daemon 进程(精灵进程),是 Linux 中的后台服务进程.它是一个生存期较长的进程,通常独立 于控制终端并且周期 ...

随机推荐

  1. 【转载】Spring bean 中 constructor-arg属性

    转载地址:https://blog.csdn.net/qq_27292113/article/details/78063696 方便以后查阅

  2. javaScript的预加载

    在有大量图片的页面中,为了避免页面加载完图片还未加载完成,我们通常会使用js的图片预加载. 这是一个预加载的demo: 首先把图片放入到一个类名为imgSrcArr的变量当中: var imgSrcA ...

  3. mysql数据库进阶

    一.索引 索引,是数据库中专门用于帮助用户快速查询数据的一种数据结构.类似于字典中的目录,查找字典内容时可以根据目录查找到数据的存放位置,然后直接获取即可. 分类: 普通索引 唯一索引 全文索引 组合 ...

  4. jmeter 参数化3_User Defined Variables(用户自定义变量)

    User Defined Variables:  一般用于Test Plan中不需要随请求迭代的参数设置,如:Host.Port Number 操作路径:Thread Group-->Add-- ...

  5. create-react-app按需引入antd-mobile

    1.引入 react-app-rewired 并修改 package.json 里的启动配置: npm i react-app-rewired@2.0.2-next.0 // 需要安装低版本 否则np ...

  6. vue项目中引入mui.poppicker.js文件时报错“Uncaught ReferenceError: mui is not defined”

    解决:在mui.js的源文件后最后加上 window.mui = mui;

  7. bootstrap 点击模态框上的提交按钮后,模态框不能关闭的解决办法

    项目问题如下图, 点击确定后,模态框没反应,按理,点击删除按钮时,弹出确认删除的模态框,点击确定后,使用ajax请求服务器,把数据库中对应的数据进行删除,根据服务器 servlet返回的状态值(del ...

  8. Shiro安全框架的说明及配置入门

    Shiro是什么? Shiro是一个非常强大的,易于使用的,开源的,权限框架.它包括了权限校验,权限授予,会话管理,安全加密等组件 什么时候使用它呢? 如果你是设计RBAC基础系统,需要编写大量用于权 ...

  9. MVVM MVC

    在WPF的MVVM模式中,View和ViewModel之间数据和命令的关联都是通过绑定实现的,绑定后View和ViewModel并不产生直接的依赖.具体就是View中出现数据变化时会尝试修改绑定的目标 ...

  10. NOIp 图论算法专题总结 (2)

    系列索引: NOIp 图论算法专题总结 (1) NOIp 图论算法专题总结 (2) NOIp 图论算法专题总结 (3) 树链剖分 https://oi-wiki.org/graph/heavy-lig ...