Skip to content

Commit

Permalink
Merge pull request #309 from jajik/directive
Browse files Browse the repository at this point in the history
Change the example directive to be consistent with the docs
  • Loading branch information
jajik authored Dec 12, 2024
2 parents 06c0ac1 + dd44f13 commit 1893118
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 29 deletions.
4 changes: 2 additions & 2 deletions native/balancers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ LoadModule lbmethod_cluster_module modules/mod_lbmethod_cluster.so
EnableWsTunnel
WSUpgradeHeader "websocket"
<VirtualHost *:6666>
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
</Directory>
</Location>
KeepAliveTimeout 300
MaxKeepAliveRequests 0
Expand Down
9 changes: 9 additions & 0 deletions native/mod_manager/mod_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -3750,11 +3750,20 @@ static const char *cmd_manager_maxmesssize(cmd_parms *cmd, void *mconfig, const
static const char *cmd_manager_enable_mcmp_receive(cmd_parms *cmd, void *dummy)
{
mod_manager_config *mconf = ap_get_module_config(cmd->server->module_config, &manager_module);
ap_directive_t *directive = cmd->directive->parent ? cmd->directive->parent->first_child : cmd->directive;
(void)dummy;

if (!cmd->server->is_virtual) {
return "EnableMCMPReceive must be in a VirtualHost";
}

while (directive) {
if (strcmp(directive->directive, "<Directory") == 0) {
return "Directory cannot be used with EnableMCMPReceive, use Location instead";
}
directive = directive->next;
}

mconf->enable_mcmp_receive = 1;
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion test-perl/t/conf/cgi.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LoadModule rewrite_module modules/mod_rewrite.so

<VirtualHost fake_cgi_app>
<Location /news>
AllowOverride None
AllowOverride None
Require all granted
RewriteEngine On
RewriteRule ^(.*)$ /cgi-bin/test.pl?url=$1 [R]
Expand Down
4 changes: 2 additions & 2 deletions test-perl/t/conf/extra.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ WSUpgradeHeader websocket
<VirtualHost mpc_test_host>
CheckNonce off
EnableMCMPReceive
<Directory />
<Location />
Require all granted
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require all granted
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-640/mod_lbmethod_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ UseNocanon On
WSUpgradeHeader websocket
<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-640/mod_proxy_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ ProxyPreserveHost On
WSUpgradeHeader websocket
<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-734/mod_proxy_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ ServerName localhost

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-755/mod_lbmethod_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ ServerName localhost

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-755/mod_proxy_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ ServerName localhost

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-785/mod_lbmethod_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ WSUpgradeHeader websocket

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-785/mod_proxy_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ WSUpgradeHeader websocket

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.1
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-794/mod_lbmethod_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ WSUpgradeHeader websocket

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.
Expand Down
4 changes: 2 additions & 2 deletions test/MODCLUSTER-794/mod_proxy_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ WSUpgradeHeader websocket

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.
Expand Down
4 changes: 2 additions & 2 deletions test/httpd/mod_lbmethod_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ WSUpgradeHeader websocket

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.
Expand Down
4 changes: 2 additions & 2 deletions test/httpd/mod_proxy_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ WSUpgradeHeader websocket

<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.
Expand Down
4 changes: 2 additions & 2 deletions test/websocket/mod_proxy_cluster.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ EnableWsTunnel
WSUpgradeHeader websocket
<VirtualHost *:6666>
EnableMCMPReceive
<Directory />
<Location />
Require ip 127.0.0.
Require ip ::1
# This one is used in GH Actions
Require ip 172.17.
</Directory>
</Location>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 127.0.0.
Expand Down

0 comments on commit 1893118

Please sign in to comment.