List Info

Thread: Altering what the internet (but not intranet) sees for a vhost




Altering what the internet (but not intranet) sees for a vhost
country flaguser name
Canada
2007-09-27 12:52:15
I've looked at the deny/allow but that doesn't seem really
right.  I
don't want to deny access to a vhost, if you're from the
internet. I
want to change what you're seeing. 

My scenario is that I'm doing maintenance on a website, and
so I still
need to be able to access it from "inside the
building", but everyone
else in the world should see a temporary page stating
"the site is down
for maintenance".  
 
I'm just not finding the right part of the docs, I think. 
Can anyone
give a hint? 


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


Re: Altering what the internet (but not intranet) sees for a vhost
user name
2007-09-27 12:56:33
On 9/27/07, gb1071nx <gb1071nxgloballyboundless.com>
wrote:
>
> I've looked at the deny/allow but that doesn't seem
really right.  I
> don't want to deny access to a vhost, if you're from
the internet. I
> want to change what you're seeing.
>
> My scenario is that I'm doing maintenance on a website,
and so I still
> need to be able to access it from "inside the
building", but everyone
> else in the world should see a temporary page stating
"the site is down
> for maintenance".
>
> I'm just not finding the right part of the docs, I
think.  Can anyone
> give a hint?

There are lots of different ways to do this. Here's a
relatively simple one:

<Location />
Order deny,allow
Deny from all
Allow from intranet.example.com
ErrorDocument 403 /underconstruction.html
</Location>

Alternatively, you could use mod_rewrite, or, if you
dedicate a
different IP address to the server for intranet and
internet
connections, you could put each in a different
<VirtualHost>.

Joshua.

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


RE: Altering what the internet (but not intranet) sees for a vhost
country flaguser name
Canada
2007-09-27 13:50:16
Thanks Joshua,
 
> 
> There are lots of different ways to do this. Here's a 
> relatively simple one:
> 
> <Location />
> Order deny,allow
> Deny from all
> Allow from intranet.example.com
> ErrorDocument 403 /underconstruction.html 
> </Location>

When I try this, and via a connection to the outside world,
try to
access the site, I get: 


-| Forbidden
-| You don't have permission to access / on this server.
-| 
-| Additionally, a 403 Forbidden error was encountered while
trying to 
-| use an ErrorDocument to handle the request.


If I "Deny from all" the "/" Location,
does that mean that I can't
server the ErrorDocument from there either? 


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


Re: Altering what the internet (but not intranet) sees for a vhost
user name
2007-09-27 13:56:41
On 9/27/07, gb1071nx <gb1071nxgloballyboundless.com>
wrote:
> Thanks Joshua,
>
> >
> > There are lots of different ways to do this.
Here's a
> > relatively simple one:
> >
> > <Location />
> > Order deny,allow
> > Deny from all
> > Allow from intranet.example.com
> > ErrorDocument 403 /underconstruction.html
> > </Location>
>
> When I try this, and via a connection to the outside
world, try to
> access the site, I get:
>
>
> -| Forbidden
> -| You don't have permission to access / on this
server.
> -|
> -| Additionally, a 403 Forbidden error was encountered
while trying to
> -| use an ErrorDocument to handle the request.
>
>
> If I "Deny from all" the "/"
Location, does that mean that I can't
> server the ErrorDocument from there either?

Yah, ok. I thought it wouldn't apply to the subrequest.
There are lots
of ways to get around this too, including putting the
following AFTER
the first <Location> block:
<Location /underconstruction.html>
Allow from all
</Location>

Joshua.

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


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )