Apache Reference Manual (2)

 更新时间:2016年11月25日 15:18  点击:2411
AuthName directive
Syntax: AuthName auth-domain
Context: directory, .htaccess
Override: AuthConfig
Status: core
This directive sets the name of the authorization realm for a directory. This realm is given to the client so that the user knows which username and password to send. AuthName takes a single argument; if the realm name contains spaces, it must be enclosed in quotation marks. It must be accompanied by AuthType and require directives, and directives such as AuthUserFile and AuthGroupFile to work.
--------------------------------------------------------------------------------
AuthType directive
Syntax: AuthType type
Context: directory, .htaccess
Override: AuthConfig
Status: core
This directive selects the type of user authentication for a directory. Only Basic and Digest are currently implemented. It must be accompanied by AuthName and require directives, and directives such as AuthUserFile and AuthGroupFile to work.
--------------------------------------------------------------------------------
BindAddress directive
Syntax: BindAddress saddr
Default: BindAddress *
Context: server config
Status: core
A Unix® http server can either listen for connections to every IP address of the server machine, or just one IP address of the server machine. Saddr can be
*
An IP address
A fully-qualified Internet domain name
If the value is *, then the server will listen for connections on every IP address, otherwise it will only listen on the IP address specified.
Only one BindAddress directive can be used. For more control over which address and ports Apache listens to, use the Listen directive instead of BindAddress.
BindAddress can be used as an alternative method for supporting virtual hosts using multiple independent servers, instead of using <VirtualHost> sections.
See Also: DNS Issues
See Also: Setting which addresses and ports Apache uses
基于各种各样的理由,PHP 的设置需要依赖于 register_globals
参数打开,但是也成为安全的重要隐患,请看下面的一段代码:
<?php
if (authenticate_user()) {
$authenticated = true;
}
...
?>
远程用户可以简单的传递 'authenticated' 作为表单变量,即使
authenticate_user() 函数返回 false,$authenticated 还是会设置成 true。这是一个简单的例子,你或许会说,我的程序不会这样来写。
而实际上,在稍微复杂一些的应用里面,这个机制就会成为重大的漏洞。
因此,新版本的 PHP ,我们建议用户不要采用这个变量来控制应用,虽然我们没有打算要在不久的将来删除。
为了帮助用户建立 register_globals 设置为 off 的应用,增加了一些变量来代替旧的,下面是7 个新的数组:
$_GET - 包含了通过 GET 发送的表单变量
$_POST - 包含了通过 POST 发送的表单变量
$_COOKIE - 包含了 HTTP cookie 变量
$_SERVER - 包含服务器端变量 (例如:REMOTE_ADDR)
$_ENV - 包含环境变量
$_REQUEST - GET 变量,POST 变量和 Cookie 变量的混合,通过用户而来而不能信任的变量。
$_SESSION - 包含通过会话模块注册的 HTTP 变量
这些变量,在任何范围内,都自动设置为全局变量,可以在任何地方调用,而不需要加 global 关键字。
例如:
function example1()
{
print $_GET["name"]; // 没有必要写成:'global $_GET;'
}
另外一个值得一提的小窍门是在 $_SESSION 数组中增加一个记录能自动作为会话变量注册,就像你调用了
session_register() 函数。

KeepAliveTimeout directive
Syntax: KeepAliveTimeout seconds
Default: KeepAliveTimeout 15
Context: server config
Status: Core
Compatibility: KeepAliveTimeout is only available in Apache 1.1 and later.
The number of seconds Apache will wait for a subsequent request before closing the connection. Once a request has been received, the timeout value specified by the Timeout directive applies.
--------------------------------------------------------------------------------
<Limit> directive
Syntax: <Limit method method ... > ... </Limit>
Context: any
Status: core
Access controls are normally effective for all access methods, and this is the usual desired behaviour. In the general case, access control directives should not be placed within a <limit> section.
The purpose of the <Limit> directive is to restrict the effect of the access controls to the nominated HTTP methods. For all other methods, the access restrictions that are enclosed in the <Limit> bracket will have no effect. The following example applies the access control only to the methods POST, PUT, and DELETE, leaving all other methods unprotected:
<Limit POST PUT DELETE>
require valid-user
</Limit>
The method names listed can be one or more of: GET, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, and UNLOCK. The method name is case-sensitive. If GET is used it will also restrict HEAD requests.
--------------------------------------------------------------------------------
<LimitExcept> directive
Syntax: <LimitExcept method method ... > ... </LimitExcept>
Context: any
Status: core
Compatibility: Available in Apache 1.3.5 and later
<LimitExcept> and </LimitExcept> are used to enclose a group of access control directives which will then apply to any HTTP access method not listed in the arguments; i.e., it is the opposite of a <Limit> section and can be used to control both standard and nonstandard/unrecognized methods. See the documentation for <Limit> for more details.
如今网络技术如日中天,才见CGI(Common Gateway Interface)又出ASP(Active Serve Page),接着杀出PHP(见后注),真是令人手忙脚乱目不暇接。这些新软件的出现,不仅给我们带来了全新的感受,同时也给我等配置较低的机器如何玩这些软件带来了问题,本文就我自己的体会,阐述在较低机器配置下如何安装PHP4.0软件。
 
  本人的“爱鸡”配置是:联想天琴909的改造产品:MMX166换成K6Ⅱ-400,内存仍为32兆字节,主板核心电压跳到2.2V……    
  软件只需要Windows 98+PWS(Personal Web Server),NT、LINUX、Win 2000一律不用装。安装过程如下:    
  1、您可以从Windows 98(正式版或OEM版)的安装盘的add-onspwssetup.exe中安装PWS,选典型安装或定制安装,使用缺省安装目录C:Inetpubwwwroot(完成单机改造成服务器的宏伟工程)。
 
  2、软件下载:http://www.php.net/distributions/php-4.0.0-Win32.zip或http://soft.km169.net/soft/wybc/php-4.0.0-win32.zip!    
  3、用解压缩工具把php-4.0.0-Win32.zip解压到PHP安装目录,如C:php(可不要说你没有WinZip呀)!    
  4、将PHP安装目录下的php.ini-dist文件拷贝到C:WINDOWS目录,并将C:WINDOWSphp.ini-dist改名为C:WINDOWSphp.ini;    
  5、将PHP安装目录下的Msvcrt.dll和php4ts.dll拷贝到C:WINDOWSSystem目录,如果C:WINDOWSSystem目录下已经存在这些文件,请不要覆盖(事先查找一下有无Msvcrt.dll);    
  6、修改C:WINDOWSphp.ini:    
  1) 将Extension_dir设置为PHP安装目录,如:extension_dir =C:php(在php.ini中左看右看,即可找到);    
  2) 配置要加载的动态链接库(DLL),注意一定要保证只能加载PHP安装目录下存在的动态链接库,如有不同的动态链接库名称,请改成与该版本自带这些动态链接库:php_calendar.dll、php_imap.dll、php_ldap.dll相一致,因此动态链接库的配置栏如下(一定要将;去掉):    
  Windows Extensions    
  extension=php_calendar.dll    
  extension=php_imap.dll    
在RedHat6.2上安装apache1.3.12+gd1.8.3+php4.04+tomcat+sybase11.9.2+oracle8.1.6+mysql全攻略 <br>
<br>
看了网上众多网友对php、jsp、sybase、oracle、apache等方面的安装经验,发现有很多都是重复而且不够全面,根据本人对以上各种东东长期总结和参考相关文档以及各位网友的文章,并经自己亲自实践,现将在RedHat6.2下apache1.3.12+gd1.8.3+php4.04+tomcat+sybase11.9.2+oracle8.1.6+mysql3.22.27的安装配置全部奉献给大家,希望能对大家有所帮助; <br>
<br>
运行环境:PⅢ550+256M+20G+530TX Lan+sis6326 8M+RedHat Linux6.2 <br>
安装规划:sybase安装在/sybase目录 <br>
oracle安装在/home/oracle目录 <br>
gd安装在/usr/local目录 <br>
apache安装在/www目录 <br>
tomcat安装在/usr/local/jakarta-tomcat目录 <br>
jdk安装在/usr/local/jdk122目录 <br>
<br>
一、资料准备 <br>
1、apache_1312.tar.gz <br>
2、php-404.tar.gz <br>
3、jakarta-tomcat.tar.gz <br>
4、sybase11.9.2包: <br>
sybase-common-1192-1i386.rpm <br>
sybase-ase-1192-1i386.rpm <br>
sybase-monserver-1192-1i386.rpm <br>
sybase-openclient-1111-1i386.rpm <br>
sybase-sqlremote-602-1i386.rpm <br>
sybase-chinese-1192-1i386.rpm <br>
5、oracle8.1.6.tar <br>
6、mysql3.22.27包: <br>
mysql-3.22.27-1.i386.rpm <br>
mysql-devel-3.22.27-1.i386.rpm <br>
mysql-client-3.22.27-1.i386.rpm <br>
7、jdk1_2_2-linux-i386.tar.gz <br>
8、mod-jserv.so <br>
9、gd183.tar.gz <br>
<br>
二、环境配置 <br>
1、系统安装 <br>
安装linux系统时创建目录/www、/sybase和/home并分配给各自较大空间,用于存储数据库资料和网页文件; <br>
2、环境变量 <br>
配置运行oracle和tomcat以及java的java运行环境变量 <br>
用root用户登录系统 <br>
#vi /etc/profile <br>
添加下列行 <br>
ORACLE_HOME=/home/oracle <br>
[!--infotagslink--]

相关文章

  • Lua语言新手简单入门教程

    这篇文章主要给大家介绍的是关于Lua语言新手入门的简单教程,文中通过示例代码一步步介绍的非常详细,对各位新手们的入门提供了一个很方便的教程,需要的朋友可以参考借鉴,下面随着小编来一起学习学习吧。...2020-06-30
  • lua读取redis数据的null判断示例代码

    最近在工作中遇到了一个问题,通过查找相关资料才得知原因是因为返回结果的问题,下面这篇文章主要给大家介绍了关于lua读取redis数据的null判断的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考下...2020-06-30
  • Django def clean()函数对表单中的数据进行验证操作

    这篇文章主要介绍了Django def clean()函数对表单中的数据进行验证操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2020-07-09
  • C#中out与ref的区别实例解析

    这篇文章主要介绍了C#中out与ref的区别实例解析,对C#初学者有不错的学习借鉴价值,需要的朋友可以参考下...2020-06-25
  • 记一次EFCore类型转换错误及解决方案

    这篇文章主要介绍了记一次EFCore类型转换错误及解决方案,帮助大家更好的理解和学习使用asp.net core,感兴趣的朋友可以了解下...2021-09-22
  • Vue3中reactive函数toRef函数ref函数简介

    这篇文章主要介绍了Vue3中的三种函数,分别对reactive函数toRef函数以及ref函数原理及使用作了简单介绍,有需要的朋友可以借鉴参考下...2021-09-24
  • Apache启动报错No space left on device: AH00023该怎么解决

    Apache启动报错No space left on device: AH00023错误可能是进程导致了,虽然小编不知道什么原因但网上提供的解决办法确实是可以解决我们的问题,下面来看看。对于这类错误是因为linux系统的ipc信号量造成的,apache启动时...2015-10-21
  • c#基础系列之ref和out的深入理解

    有过C#基础知识的都应该清楚Ref和Out的使用方法,所以下面这篇文章主要给大家介绍了关于c#基础系列之ref和out的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考借鉴,下面随着小编来一起学习学习吧...2020-06-25
  • apache配置黑名单和白名单及账户权限控制

    本文我们将分享apache配置黑名单和白名单,apache层的账户权限控制,以及apache黑名单白名单过滤功能,apache rewrite规则实现白名单。 apache配置黑名单和白名单的两...2016-09-14
  • Lua判断变量是否为数字、字符串是否可以转换为数字等

    这篇文章主要介绍了Lua判断变量是否为数字、字符串是否可以转换为数字等,本文讲解了Lua 判断是字符还是数字的方法、Lua判断数字的方法、判断可否转换为数字的方法、判断并且准备一个初值的方法,需要的朋友可以参考下...2020-06-30
  • apache开启gzip详解教程

    今天在用百度工具检测时发,发现有个提示如下 原来可以开启gzip啊,因为我的是apache所以和iis不同,经过网站搜索开启方法如下 一,找到你的httpd.conf文件,打开找到如下 ...2016-01-28
  • 解决PHPstudy Apache无法启动的问题【亲测有效】

    这篇文章主要介绍了PHPstudy Apache无法启动的问题及解决方法【亲测有效】,本文给大家总结了三种方法供大家参考,需要的朋友可以参考下...2020-10-30
  • apache http server遇到了一个问题,需要关闭

    重装系统后,重新安装了xamp,最近启动的时候经常报apache http server遇到了一个问题,需要关闭,显示如图: 解决方法:查看szModName报错的模块,然后把PHP安装目录下对应的模块...2016-01-28
  • Windows Server 2016 上配置 APACHE+SSL+PHP+perl的教程详解

    Windows Server 2016 上配置 APACHE+SSL+PHP+perl怎么配置?小编推荐了一篇介绍Windows Server 2016 上配置 APACHE+SSL+PHP+perl的教程,有需要的同学快来看看吧! ...2017-07-06
  • nginx+apache+mysql+php+memcached+squid搭建集群web环境

    当前,LAMP开发模式是WEB开发的首选,如何搭建一个高效、可靠、稳定的WEB服务器一直是个热门主题,本文就是这个主题的一次尝试。...2016-01-27
  • 详解Ref在React中的交叉用法

    众所周知,react推出了hooks之后,很多项目就开始往hooks上靠拢,所以也就出现了class和hooks交叉使用的项目。这个时候使用ref需要注意一些东西...2021-06-20
  • Lua流程控制语句if else的使用示例

    今天小编就为大家分享一篇关于Lua流程控制语句if else的使用示例,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧...2020-06-30
  • 隐藏Nginx或Apache以及PHP的版本号的方法

    这篇文章主要介绍了隐藏Nginx或Apache以及PHP的版本号的方法,主要用来防止针对性的漏洞攻击,需要的朋友可以参考下...2016-01-05
  • apache下设置缓存方法详细介绍

    默认情况下,apache安装完以后,是不允许被cache的。如果外接了cache或squid服务器要求进行web加速的话,就需要在htttpd.conf里进行设置,当然前提是在安装apache的时候要激活mod_c...2016-01-28
  • Lua的table库函数insert、remove、concat、sort详细介绍

    这篇文章主要介绍了Lua的table库函数insert、remove、concat、sort详细介绍,本文分别给出了这几个函数的使用实例,需要的朋友可以参考下...2020-06-30