Apache HttpServer
共 7 篇文章
Apache(七)使用auth_dbm
一、AuthDBMUserFile <AuthnProviderAlias file ufile> AuthUserFile /root/apache2/auth/userfile </AuthnProviderAlias> <Directory /root/apache2/htdoc> AllowOverride None AuthType Basic AuthName "Entry username and password" AuthBasicProvider ufile Require valid-user </Directory> 假如有成百上千个用户在userfile文件中,那么…
2012-03-28 18:42 · Apache HttpServer
Apache(六)Authentication Provider Aliases
以下是一个简单的目录上下文配置 <Directory /root/apache2/doc> AuthType Basic AuthName Document AuthUserFile /root/apache2/auth/passwd Require user rote </Directory> 上面是通过AuthUserType指定的用户信息文件,还可通过下面两种方式设置授权,效果同上 一、用户文件 <AuthnProviderAlias file pwdfile> AuthUserFile /root/apache2/auth/passwd </AuthnProviderAlias> <…
2012-03-27 20:43 · Apache HttpServer
Apache(五)设置资源访问限制
以下[]中的表示可选项,实际中不能包含[]及其内容 一、指定目录的AuthType <Directory /root/apache2> AuthType Basic [None | Basic | Digest | Form] </Directory> 二、设置AuthName,该信息将在客户端提醒框上显示 <Directory /root/apache2> AuthType Basic [None | Basic | Digest | Form] AuthName "Entry username and password" </Directory> 三、指定AuthUserFile,指定用…
2012-03-27 20:18 · Apache HttpServer
Apache(四)访问验证方式
Require all granted 允许所有请求访问资源 Require all denied 拒绝所有请求访问资源 Require env env-var [env-var] ... 当指定环境变量设置时允许访问 Require method http-method [http-method] ... 允许指定的http请求方法访问资源 Require expr expression 当expression返回true时允许访问资源 Require user userid [userid] ... 允许指定的用户id访问资源 Require group group-name [grou…
2012-03-27 19:42 · Apache HttpServer
Apache(三)修改绑定端口和IP
修改httpd.conf文件中的Listen可设置监听端口 默认监听端口是80 Listen 80 设置一、监听端口80和8080 Listen 80 Listen 8080 设置二、绑定指定地址 Listen 10.192.168.111:8080 设置三、绑定IPV6地址,IP地址需用方括号 Listen [2001:db8:a00:20ff:fea7:ccea]:8080 设置四、设置绑定端口及访问协议 Listen 10.192.168.111:8666 https
2012-03-24 18:18 · Apache HttpServer
Apache(二)启动/停止 工具介绍
启动/停止Apache HttpServer 一、进入目录prefix/bin 通过执行 apachectl 控制apache;apachectl在运行时会设置一些必要的环境变量信息,以保证 httpd能正确的运行,然后再调用httpd。 二、修改prefix/conf/httpd.conf 把ServerName取消注释,并设置ServerName的值 三、apachectl(httpd)的部分运行参数 若apache配置为开机启动,则参数设置: http://httpd.apache.org/docs/2.4/programs/apachectl.html 若手动启动apache,则参数…
2012-03-24 18:07 · Apache HttpServer
Apache(一)安装
本文仅记录学习Apache HttpServer的过程,以便加深记忆及以后查找 一、下载Apache HttpServer 下载地址: http://httpd.apache.org/ 二、解压 gzip -dvf httpd-2.4.1.tar.gz tar -xvf httpd-2.4.1.tar 安装前需依次装好 apr(Apache Portable Runtime) 和 apr-util(安装apu的时候需要指定apr安装目录) 三、安装前的配置 执行./configure options 解压后进入httpd-2.4.1目录,执行configure options... [var…
2012-03-21 16:22 · Apache HttpServer