blob: 5f740cd691fdc5a742da5777ac99628e6242f17e (
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
|
#t/TEST -proxy
<IfModule mod_proxy.c>
<VirtualHost _default_:mod_proxy>
ProxyRequests On
</VirtualHost>
</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>
<Proxy balancer://foo1>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
<Proxy balancer://foo2>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
<Proxy balancer://foo3>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
<Proxy balancer://foo4>
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL1_PORT@ loadfactor=1
BalancerMember http://@SERVERNAME@:@PROXY_HTTP_BAL2_PORT@ loadfactor=1
</Proxy>
ProxySet balancer://foo1 lbmethod=byrequests
ProxySet balancer://foo2 lbmethod=bytraffic
ProxySet balancer://foo3 lbmethod=bybusyness
<IfVersion >= 2.3.0>
ProxySet balancer://foo4 lbmethod=heartbeat
</IfVersion>
<Location /baltest1>
ProxyPass balancer://foo1/
</Location>
<Location /baltest2>
ProxyPass balancer://foo2/
</Location>
<Location /baltest3>
ProxyPass balancer://foo3/
</Location>
<IfVersion >= 2.3.0>
<Location /baltest4>
# TODO heartbeat needs additional configuration to have it work
ProxyPass balancer://foo4/
</Location>
</IfVersion>
## PR 45434 tests
<Proxy balancer://pr45434>
BalancerMember http://@SERVERNAME@:@PORT@/modules
</Proxy>
ProxyPass /pr45434 balancer://pr45434/alias
ProxyPassReverse /pr45434 balancer://pr45434/alias
</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>
</IfModule>
<IfModule mod_rewrite.c>
<Directory @SERVERROOT@/htdocs/modules/proxy/rewrite>
AllowOverride All
</Directory>
</IfModule>
|