Skip to content

Commit 1893118

Browse files
authored
Merge pull request #309 from jajik/directive
Change the example directive to be consistent with the docs
2 parents 06c0ac1 + dd44f13 commit 1893118

16 files changed

Lines changed: 38 additions & 29 deletions

native/balancers/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ LoadModule lbmethod_cluster_module modules/mod_lbmethod_cluster.so
2323
EnableWsTunnel
2424
WSUpgradeHeader "websocket"
2525
<VirtualHost *:6666>
26-
<Directory />
26+
<Location />
2727
Require ip 127.0.0.1
2828
Require ip ::1
29-
</Directory>
29+
</Location>
3030
3131
KeepAliveTimeout 300
3232
MaxKeepAliveRequests 0

native/mod_manager/mod_manager.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3750,11 +3750,20 @@ static const char *cmd_manager_maxmesssize(cmd_parms *cmd, void *mconfig, const
37503750
static const char *cmd_manager_enable_mcmp_receive(cmd_parms *cmd, void *dummy)
37513751
{
37523752
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
3753+
ap_directive_t *directive = cmd->directive->parent ? cmd->directive->parent->first_child : cmd->directive;
37533754
(void)dummy;
37543755

37553756
if (!cmd->server->is_virtual) {
37563757
return "EnableMCMPReceive must be in a VirtualHost";
37573758
}
3759+
3760+
while (directive) {
3761+
if (strcmp(directive->directive, "<Directory") == 0) {
3762+
return "Directory cannot be used with EnableMCMPReceive, use Location instead";
3763+
}
3764+
directive = directive->next;
3765+
}
3766+
37583767
mconf->enable_mcmp_receive = 1;
37593768
return NULL;
37603769
}

test-perl/t/conf/cgi.conf.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LoadModule rewrite_module modules/mod_rewrite.so
1111

1212
<VirtualHost fake_cgi_app>
1313
<Location /news>
14-
AllowOverride None
14+
AllowOverride None
1515
Require all granted
1616
RewriteEngine On
1717
RewriteRule ^(.*)$ /cgi-bin/test.pl?url=$1 [R]

test-perl/t/conf/extra.conf.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ WSUpgradeHeader websocket
1919
<VirtualHost mpc_test_host>
2020
CheckNonce off
2121
EnableMCMPReceive
22-
<Directory />
22+
<Location />
2323
Require all granted
24-
</Directory>
24+
</Location>
2525
<Location /mod_cluster_manager>
2626
SetHandler mod_cluster-manager
2727
Require all granted

test/MODCLUSTER-640/mod_lbmethod_cluster.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ UseNocanon On
2121
WSUpgradeHeader websocket
2222
<VirtualHost *:6666>
2323
EnableMCMPReceive
24-
<Directory />
24+
<Location />
2525
Require ip 127.0.0.1
2626
Require ip ::1
2727
# This one is used in GH Actions
2828
Require ip 172.17.
29-
</Directory>
29+
</Location>
3030
<Location /mod_cluster_manager>
3131
SetHandler mod_cluster-manager
3232
Require ip 127.0.0.1

test/MODCLUSTER-640/mod_proxy_cluster.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ ProxyPreserveHost On
2929
WSUpgradeHeader websocket
3030
<VirtualHost *:6666>
3131
EnableMCMPReceive
32-
<Directory />
32+
<Location />
3333
Require ip 127.0.0.1
3434
Require ip ::1
3535
# This one is used in GH Actions
3636
Require ip 172.17.
37-
</Directory>
37+
</Location>
3838
<Location /mod_cluster_manager>
3939
SetHandler mod_cluster-manager
4040
Require ip 127.0.0.1

test/MODCLUSTER-734/mod_proxy_cluster.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ ServerName localhost
1717

1818
<VirtualHost *:6666>
1919
EnableMCMPReceive
20-
<Directory />
20+
<Location />
2121
Require ip 127.0.0.1
2222
Require ip ::1
2323
# This one is used in GH Actions
2424
Require ip 172.17.
25-
</Directory>
25+
</Location>
2626
<Location /mod_cluster_manager>
2727
SetHandler mod_cluster-manager
2828
Require ip 127.0.0.1

test/MODCLUSTER-755/mod_lbmethod_cluster.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ ServerName localhost
1717

1818
<VirtualHost *:6666>
1919
EnableMCMPReceive
20-
<Directory />
20+
<Location />
2121
Require ip 127.0.0.1
2222
Require ip ::1
2323
# This one is used in GH Actions
2424
Require ip 172.17.
25-
</Directory>
25+
</Location>
2626
<Location /mod_cluster_manager>
2727
SetHandler mod_cluster-manager
2828
Require ip 127.0.0.1

test/MODCLUSTER-755/mod_proxy_cluster.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ ServerName localhost
1414

1515
<VirtualHost *:6666>
1616
EnableMCMPReceive
17-
<Directory />
17+
<Location />
1818
Require ip 127.0.0.1
1919
Require ip ::1
2020
# This one is used in GH Actions
2121
Require ip 172.17.
22-
</Directory>
22+
</Location>
2323
<Location /mod_cluster_manager>
2424
SetHandler mod_cluster-manager
2525
Require ip 127.0.0.1

test/MODCLUSTER-785/mod_lbmethod_cluster.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ WSUpgradeHeader websocket
2020

2121
<VirtualHost *:6666>
2222
EnableMCMPReceive
23-
<Directory />
23+
<Location />
2424
Require ip 127.0.0.1
2525
Require ip ::1
2626
# This one is used in GH Actions
2727
Require ip 172.17.
28-
</Directory>
28+
</Location>
2929
<Location /mod_cluster_manager>
3030
SetHandler mod_cluster-manager
3131
Require ip 127.0.0.1

0 commit comments

Comments
 (0)