[CentOS] webserver setup

Fri Nov 23 08:48:47 UTC 2007
Christopher Chan <christopher at ias.com.hk>

Andreas Kuntzagk wrote:
> Hi,
> 
> I have setup a webserver on CentOS 4.5 with NameVirtualHost.
> Two VirtualHost should be reachable by port 80 from outside, while the
> third (default) should be only reachable by https from outside but by
> http from inside. 
> Since all share the same IP firewalling seems to be out of question. So
> is there a way to restrict that in Apache config?
> 

use the allow/deny directives

Order Allow,Deny
Allow from internal/subnet

inside the third http section.

That will force those on the outside to use https or see an error. Or 
maybe, just redirect them to https with RedirectMatch whether from 
internal or external ips.

> regards, Andreas
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos