Re: [users@httpd] HTTP or HTTPS access based on subnet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/28/06, Leon Stringer <leon.stringer@xxxxxxxxxxxx> wrote:
> Hi,
>
> I'm looking at encrypting traffic to a web server and have successfully
> generated a certificate and key, set up a VirtualHost for port 443.
>
> I then used Redirect to send requests to the old URL (on port 80) to the
> VirtualHost to prevent port 80 access.
>
> This appears to be working fine.
>
> However, what I'd ideally like to do is allow traffic from my LAN access
> on port 80 (e.g. anyone from 192.168.0.0/24) but make everyone else go
> the HTTPS route. I've seen the Allow/Deny entries but I don't seem to be
> able to get a legal combination of these and my other settings.
>
> Presumably this is a common thing to want to do, but there's nothing
> obvious from my searches so far.

Order Deny,Allow
Deny from all
Allow from 192.168.0.0/24
ErrorDocument 403 https://yoursite.example.com/

But people often use mod_rewrite for a task like this to gain more
precise controls over what URLs are redirected where.  (For example,
if you wanted to make sure the specific path was carried over to the
other site, you would want to use mod_rewrite.)

Joshua.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux