Skip to content

Commit 3e0e679

Browse files
authored
Merge pull request #855 from jajik/directive-backport
[1.3.x] Change the example directive to be consistent with the docs
2 parents b67c2d6 + 755088d commit 3e0e679

File tree

5 files changed

+31
-18
lines changed

5 files changed

+31
-18
lines changed

docs/userguide/src/main/docbook/modules/faq.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,18 @@ GET /
166166
<listitem>
167167
<para>"client denied by server configuration":</para>
168168
<para>
169-
The directory in the VirtualHost is not allowed for the client.
169+
The location in the VirtualHost is not allowed for the client.
170170
If you have something like:
171171
</para>
172172
<programlisting>Mon Jun 28 18:08:47 2010] [error] [client 10.33.144.3] client denied by server configuration: /</programlisting>
173173
<para>
174174
You need to have something like:
175175
</para>
176-
<programlisting><![CDATA[<Directory />
176+
<programlisting><![CDATA[<Location />
177177
Order deny,allow
178178
Deny from all
179179
Allow from 10.33.144.3
180-
</Directory>]]></programlisting>
180+
</Location>]]></programlisting>
181181
</listitem>
182182
</orderedlist>
183183
</section>
@@ -191,11 +191,11 @@ GET /
191191
</para>
192192
<programlisting><![CDATA[
193193
<VirtualHost localhost:6666>
194-
<Directory />
194+
<Location />
195195
Order deny,allow
196196
Deny from all
197197
Allow from 127.0.0.1
198-
</Directory>
198+
</Location>
199199
ServerAdvertise on http://localhost:6666
200200
EnableMCPMReceive
201201
</VirtualHost>

docs/userguide/src/main/docbook/modules/quick-start.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ LoadModule advertise_module /opt/jboss/httpd/lib/httpd/modules/mod_advertise.so
122122
Listen 10.33.144.3:6666
123123
<VirtualHost 10.33.144.3:6666>
124124
125-
<Directory />
125+
<Location />
126126
Order deny,allow
127127
Deny from all
128128
Allow from 10.33.144.
129-
</Directory>
129+
</Location>
130130
131131
KeepAliveTimeout 60
132132
MaxKeepAliveRequests 0
@@ -149,11 +149,11 @@ LoadModule advertise_module modules/mod_advertise.so
149149
Listen 10.33.144.3:6666
150150
<VirtualHost 10.33.144.3:6666>
151151
152-
<Directory />
152+
<Location />
153153
Order deny,allow
154154
Deny from all
155155
Allow from 10.33.144.
156-
</Directory>
156+
</Location>
157157
158158
KeepAliveTimeout 60
159159
MaxKeepAliveRequests 0

native/mod_manager/mod_manager.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3405,11 +3405,24 @@ static const char*cmd_manager_maxmesssize(cmd_parms *cmd, void *mconfig, const c
34053405
static const char*cmd_manager_enable_mcmp_receive(cmd_parms *cmd, void *dummy)
34063406
{
34073407
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
3408-
if (!cmd->server->is_virtual)
3409-
return "EnableMCPMReceive must be in a VirtualHost";
3410-
mconf->enable_mcmp_receive = -1;
3408+
ap_directive_t *directive = cmd->directive->parent ? cmd->directive->parent->first_child : cmd->directive;
3409+
(void)dummy;
3410+
3411+
if (!cmd->server->is_virtual) {
3412+
return "EnableMCMPReceive must be in a VirtualHost";
3413+
}
3414+
3415+
while (directive) {
3416+
if (strcmp(directive->directive, "<Directory") == 0) {
3417+
return "Directory cannot be used with EnableMCMPReceive, use Location instead";
3418+
}
3419+
directive = directive->next;
3420+
}
3421+
3422+
mconf->enable_mcmp_receive = 1;
34113423
return NULL;
34123424
}
3425+
34133426
static const char*cmd_manager_enable_mcmp_receive_deprecated(cmd_parms *cmd, void *dummy)
34143427
{
34153428
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,

test/java/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ NOTE the httpd should have something like the following in httpd.conf
1717
<IfModule manager_module>
1818
Listen jfcpc:6666
1919
<VirtualHost jfcpc:6666>
20-
<Directory />
20+
<Location />
2121
Order deny,allow
2222
Deny from all
2323
Allow from 10.33.144
24-
</Directory>
24+
</Location>
2525

2626
KeepAliveTimeout 300
2727
MaxKeepAliveRequests 0

test/java/installhttpd.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,11 @@ then
314314
Listen @IP@:6666
315315
ManagerBalancerName mycluster
316316
<VirtualHost @IP@:6666>
317-
<Directory />
317+
<Location />
318318
Order deny,allow
319319
Deny from all
320320
Allow from @SUBIP@
321-
</Directory>
321+
</Location>
322322
323323
KeepAliveTimeout 300
324324
MaxKeepAliveRequests 0
@@ -343,9 +343,9 @@ EOF
343343
Listen @IP@:6666
344344
ManagerBalancerName mycluster
345345
<VirtualHost @IP@:6666>
346-
<Directory />
346+
<Location />
347347
Require ip @SUBIP@
348-
</Directory>
348+
</Location>
349349
350350
KeepAliveTimeout 300
351351
MaxKeepAliveRequests 0

0 commit comments

Comments
 (0)