1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
|
# http.conf used for testing auth-test
ServerName 127.0.0.1
Listen 127.0.0.1:47524
DocumentRoot .
# The tests shut down apache with "graceful-stop", because that makes
# it close its listening socket right away. But it seems to sometimes
# result in apache never fully exiting. This fixes that.
GracefulShutdownTimeout 1
# Change this to "./error.log" if it's failing and you don't know why
ErrorLog /dev/null
LoadModule mpm_event_module @APACHE_MODULE_DIR@/mod_mpm_event.so
LoadModule alias_module @APACHE_MODULE_DIR@/mod_alias.so
LoadModule auth_basic_module @APACHE_MODULE_DIR@/mod_auth_basic.so
LoadModule auth_digest_module @APACHE_MODULE_DIR@/mod_auth_digest.so
LoadModule authn_core_module @APACHE_MODULE_DIR@/mod_authn_core.so
LoadModule authn_file_module @APACHE_MODULE_DIR@/mod_authn_file.so
LoadModule authz_core_module @APACHE_MODULE_DIR@/mod_authz_core.so
LoadModule authz_host_module @APACHE_MODULE_DIR@/mod_authz_host.so
LoadModule authz_user_module @APACHE_MODULE_DIR@/mod_authz_user.so
LoadModule dir_module @APACHE_MODULE_DIR@/mod_dir.so
LoadModule mime_module @APACHE_MODULE_DIR@/mod_mime.so
LoadModule proxy_module @APACHE_MODULE_DIR@/mod_proxy.so
LoadModule proxy_http_module @APACHE_MODULE_DIR@/mod_proxy_http.so
LoadModule proxy_connect_module @APACHE_MODULE_DIR@/mod_proxy_connect.so
LoadModule ssl_module @APACHE_SSL_MODULE_DIR@/mod_ssl.so
@IF_HAVE_MOD_UNIXD@LoadModule unixd_module @APACHE_SSL_MODULE_DIR@/mod_unixd.so
@IF_HAVE_MOD_HTTP2@LoadModule http2_module @APACHE_HTTP2_MODULE_DIR@/mod_http2.so
DirectoryIndex index.txt
TypesConfig /dev/null
Redirect permanent /redirected /index.txt
# Prefer http1 for now because most of the tests expect http1 behavior.
Protocols http/1.1 h2
# Proxy #1: unauthenticated
Listen 127.0.0.1:47526
<VirtualHost 127.0.0.1:47526>
ProxyRequests On
AllowCONNECT 47525
# Deny proxying by default
<Proxy *>
Require all denied
</Proxy>
# Allow local http connections
<Proxy http://127.0.0.1*>
Require all granted
</Proxy>
# Allow CONNECT to local https port
<Proxy 127.0.0.1:47525>
Require all granted
</Proxy>
# Deny non-proxy requests
<Directory />
Require all denied
</Directory>
</VirtualHost>
# Proxy #2: authenticated
Listen 127.0.0.1:47527
<VirtualHost 127.0.0.1:47527>
ProxyRequests On
AllowCONNECT 47525
# Deny proxying by default
<Proxy *>
Require all denied
</Proxy>
# Allow local http connections with authentication
<Proxy http://127.0.0.1:47524*>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require valid-user
</Proxy>
# Allow CONNECT to local https port with authentication
<Proxy 127.0.0.1:47525>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require valid-user
</Proxy>
# Fail non-proxy requests
<Directory />
Require all denied
</Directory>
</VirtualHost>
# Proxy #3: unauthenticatable-to
Listen 127.0.0.1:47528
<VirtualHost 127.0.0.1:47528>
ProxyRequests On
AllowCONNECT 47525
# Deny proxying by default
<Proxy *>
Require all denied
</Proxy>
# Allow local http connections with authentication
<Proxy http://127.0.0.1:47524*>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require user no-such-user
</Proxy>
# Allow CONNECT to local https port with authentication
<Proxy 127.0.0.1:47525>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require user no-such-user
</Proxy>
# Fail non-proxy requests
<Directory />
Require all denied
</Directory>
</VirtualHost>
# SSL setup
<IfModule mod_ssl.c>
Listen 127.0.0.1:47525
<VirtualHost 127.0.0.1:47525>
SSLEngine on
SSLCertificateFile ./test-cert.pem
SSLCertificateKeyFile ./test-key.pem
</VirtualHost>
</IfModule>
# Basic auth tests
Alias /Basic/realm1/realm2/realm1 .
Alias /Basic/realm1/realm2 .
Alias /Basic/realm1/subdir .
Alias /Basic/realm1/not .
Alias /Basic/realm1 .
Alias /Basic/realm12/subdir .
Alias /Basic/realm12 .
Alias /Basic/realm2 .
Alias /Basic/realm3 .
Alias /Basic .
Alias /BasicRoot .
<Location /Basic/realm1>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require user user1
</Location>
<Location /Basic/realm1/not>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require user user2
</Location>
<Location /Basic/realm12>
AuthType Basic
AuthName realm12
AuthUserFile ./htpasswd
Require user user1 user2
</Location>
<Location /Basic/realm1/realm2>
AuthType Basic
AuthName realm2
AuthUserFile ./htpasswd
Require user user2
</Location>
<Location /Basic/realm1/realm2/realm1>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require user user1
</Location>
<Location /Basic/realm2>
AuthType Basic
AuthName realm2
AuthUserFile ./htpasswd
Require user user2
</Location>
<Location /Basic/realm3>
AuthType Basic
AuthName realm3
AuthUserFile ./htpasswd
Require user user3
</Location>
<Location /BasicRoot>
AuthType Basic
AuthName realm1
AuthUserFile ./htpasswd
Require user user1
</Location>
# Digest auth tests
Alias /Digest/realm1/realm2/realm1 .
Alias /Digest/realm1/realm2 .
Alias /Digest/realm1/subdir .
Alias /Digest/realm1/expire .
Alias /Digest/realm1/not .
Alias /Digest/realm1 .
Alias /Digest/realm2 .
Alias /Digest/realm3 .
Alias /Digest .
<Location /Digest/realm1>
AuthType Digest
AuthName realm1
AuthUserFile ./htdigest
AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1
Require valid-user
</Location>
<Location /Digest/realm1/expire>
AuthType Digest
AuthName realm1
AuthUserFile ./htdigest
AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1
AuthDigestNonceLifetime 2
Require valid-user
</Location>
<Location /Digest/realm1/not>
AuthType Digest
AuthName realm1
AuthUserFile ./htdigest
AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1
Require user user2
</Location>
<Location /Digest/realm1/realm2>
AuthType Digest
AuthName realm2
AuthUserFile ./htdigest
AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2
Require valid-user
</Location>
<Location /Digest/realm1/realm2/realm1>
AuthType Digest
AuthName realm1
AuthUserFile ./htdigest
AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1
Require valid-user
</Location>
<Location /Digest/realm2>
AuthType Digest
AuthName realm2
AuthUserFile ./htdigest
AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2
Require valid-user
</Location>
<Location /Digest/realm3>
AuthType Digest
AuthName realm3
AuthUserFile ./htdigest
AuthDigestDomain /Digest/realm3
Require valid-user
# test RFC2069-style Digest
AuthDigestQop none
</Location>
<Location /client-cert>
SSLVerifyClient require
</Location>
|