You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michele Mase' <mi...@gmail.com> on 2011/03/30 10:30:57 UTC

[users@httpd] Virtualhost location variable

I've the following situation:
I need to block the access on a particular location,as the example:
...
<Location /manager>
Order Deny,Allow
Deny from all
Allow from localhost safenet1 safenet2 ...
</Location>
...

I need to do the same for all the virtualhosts, more than 1K...

Solution1:

using sed|awk put the rule inside all virtualhosts.

Solution2:

How could I write some env variable thet by default block the /manager uri?
Is it possible?

Regards
Michele

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Fwd: Virtualhost location variable

Posted by Mark Montague <ma...@catseye.org>.
  On April 15, 2011 18:19 , "Michele Mase'" <mi...@gmail.com> wrote:
> I need to block the access on a particular location,as the example:
> ...
> <Location /manager>
> Order Deny,Allow
> Deny from all
> Allow from localhost safenet1 safenet2 ...
> </Location>
> ...
>
> I need to do the same for all the virtualhosts, more than 1K...

You should be able to put the <Location> block, above, into the server 
config context of your configuration file, outside of any virtual host 
context.  The <Location> block will then apply to all virtual hosts.

--
   Mark Montague
   mark@catseye.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Fwd: Virtualhost location variable

Posted by Michele Mase' <mi...@gmail.com>.
Anyone?

---------- Forwarded message ----------
From: Michele Mase' <mi...@gmail.com>
Date: Wed, Mar 30, 2011 at 10:30 AM
Subject: Virtualhost location variable
To: users@httpd.apache.org


I've the following situation:
I need to block the access on a particular location,as the example:
...
<Location /manager>
Order Deny,Allow
Deny from all
Allow from localhost safenet1 safenet2 ...
</Location>
...

I need to do the same for all the virtualhosts, more than 1K...

Solution1:

using sed|awk put the rule inside all virtualhosts.

Solution2:

How could I write some env variable that by default blocks the /manager uri?
Is it possible?

Regards
Michele