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