blob: a199ca861ab5a8331729b0318e1a9556b2e62a5a (
plain)
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
|
#t/TEST -proxy
<IfModule mod_proxy.c>
<VirtualHost _default_:mod_proxy>
ProxyRequests On
</VirtualHost>
<IfVersion >= 2.4.49>
# Test the mapping.
ProxyPass /mapping http://@SERVERNAME@:@PORT@/servlet mapping=servlet
</IfVersion>
</IfModule>
<IfModule mod_proxy_hcheck.c>
# Suppress the error_log spam every 100ms watchdog cycle at trace5
LogLevel proxy_hcheck:trace4
</IfModule>
<IfModule mod_proxy_balancer.c>
<VirtualHost proxy_http_bal1>
DocumentRoot @SERVERROOT@/htdocs
</VirtualHost>
<VirtualHost proxy_http_bal2>
DocumentRoot @SERVERROOT@/htdocs
</VirtualHost>
<VirtualHost proxy_http_balancer>
<IfModule mod_lbmethod_byrequests.c>
<Proxy balancer://foo1>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
ProxySet balancer://foo1 lbmethod=byrequests
<Location /baltest1>
ProxyPass balancer://foo1/
</Location>
</IfModule>
<IfModule mod_lbmethod_bytraffic.c>
<Proxy balancer://foo2>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
ProxySet balancer://foo2 lbmethod=bytraffic
<Location /baltest2>
ProxyPass balancer://foo2/
</Location>
</IfModule>
<IfModule mod_lbmethod_bybusyness.c>
<Proxy balancer://foo3>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
ProxySet balancer://foo3 lbmethod=bybusyness
<Location /baltest3>
ProxyPass balancer://foo3/
</Location>
</IfModule>
<IfModule mod_lbmethod_heartbeat.c>
<Proxy balancer://foo4>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
ProxySet balancer://foo4 lbmethod=heartbeat
<Location /baltest4>
# TODO heartbeat needs additional configuration to have it work
ProxyPass balancer://foo4/
</Location>
</IfModule>
## PR 45434 tests
<Proxy balancer://pr45434>
BalancerMember http://@SERVERNAME@:@PORT@/modules
</Proxy>
ProxyPass /pr45434 balancer://pr45434/alias
ProxyPassReverse /pr45434 balancer://pr45434/alias
<Proxy balancer://failover>
BalancerMember http://@SERVERNAME@:@NextAvailablePort@ loadfactor=1 retry=1ms
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1 status=H
</Proxy>
ProxyPassMatch ^/baltest_echo_post balancer://failover/echo_post
## Test "dynamic balancer
<Proxy balancer://dynproxy>
ProxySet growth=10
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Allow from all
</Location>
ProxyPass /dynproxy balancer://dynproxy/
</VirtualHost>
</IfModule>
#
# Test config for FCGI (see t/modules/proxy_fcgi.t)
#
<IfModule mod_proxy_fcgi.c>
# XXX we have no way to retrieve the NextAvailablePort from Apache::Test...
Define FCGI_PORT @NextAvailablePort@
<VirtualHost proxy_fcgi>
<IfVersion >= 2.4.26>
# ProxyFCGISetEnvIf tests
<Location /fcgisetenv>
SetHandler proxy:fcgi://127.0.0.1:${FCGI_PORT}
ProxyFCGISetEnvIf true QUERY_STRING test_value
ProxyFCGISetEnvIf true TEST_EMPTY
ProxyFCGISetEnvIf false TEST_NOT_SET
ProxyFCGISetEnvIf true TEST_DOCROOT "%{DOCUMENT_ROOT}"
ProxyFCGISetEnvIf "reqenv('GATEWAY_INTERFACE') =~ m#CGI/(.\..)#" TEST_CGI_VERSION "v$1"
ProxyFCGISetEnvIf true !REMOTE_ADDR
</Location>
</IfVersion>
<Directory @SERVERROOT@/htdocs/modules/proxy/fcgi>
<FilesMatch \.php$>
SetHandler proxy:fcgi://127.0.0.1:${FCGI_PORT}
</FilesMatch>
</Directory>
<IfVersion >= 2.4.26>
<Directory @SERVERROOT@/htdocs/modules/proxy/fcgi-generic>
ProxyFCGIBackendType GENERIC
<FilesMatch \.php$>
SetHandler proxy:fcgi://127.0.0.1:${FCGI_PORT}
</FilesMatch>
</Directory>
<Directory @SERVERROOT@/htdocs/php/fpm>
ProxyFCGIBackendType FPM
</Directory>
</IfVersion>
<IfModule mod_rewrite.c>
<IfVersion >= 2.4.26>
<Directory @SERVERROOT@/htdocs/modules/proxy/fcgi-generic-rewrite>
ProxyFCGIBackendType GENERIC
RewriteEngine On
RewriteRule ^.*\.php(/.*)?$ fcgi://127.0.0.1:${FCGI_PORT}@SERVERROOT@/htdocs/modules/proxy/fcgi-generic-rewrite/$0 [L,P]
</Directory>
</IfVersion>
<Directory @SERVERROOT@/htdocs/modules/proxy/fcgi-rewrite-path-info>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ index.php/$0 [L]
<Files index.php>
SetHandler proxy:fcgi://127.0.0.1:${FCGI_PORT}
</Files>
</Directory>
</IfModule>
<IfModule mod_actions.c>
#AddType application/x-php-fpm .php
Action application/x-php-fpm /php/fpm/action virtual
<Location /php/fpm/action>
SetHandler proxy:fcgi://localhost:9001
</Location>
<Directory @SERVERROOT@/htdocs/modules/proxy/fcgi-action>
AddType application/x-fcgi-action .php
Action application/x-fcgi-action /fcgi-action-virtual virtual
</Directory>
<Location /fcgi-action-virtual>
SetHandler proxy:fcgi://127.0.0.1:${FCGI_PORT}
</Location>
Action application/x-php-fpm /php-fpm-pp/
ProxyPass /php-fpm-pp/ fcgi://localhost:9001/@SERVERROOT@/htdocs/
ProxyPassReverse /php-fpm-pp/ fcgi://localhost:9001/@SERVERROOT@/htdocs/
</IfModule>
</VirtualHost>
ProxyPass /proxy/wsoc ws://@SERVERNAME@:@PORT@/modules/lua/websockets.lua
</IfModule>
<IfModule mod_rewrite.c>
<Directory @SERVERROOT@/htdocs/modules/proxy/rewrite>
AllowOverride All
</Directory>
</IfModule>
|