You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jørund Skriubakken <j....@morecom.no> on 2003/11/28 11:27:17 UTC

[users@httpd] Newbe: virtual host setup

Hi all!

I have a machine setup with two net-interfaces; one to the external network (Internet) and one to the internal (intranet). The external interface has an public IP address.

I have a virtualhost setup; one for the external webpages and another for the internal webpages.I want to restrict access so that requests through the public IP address only allows requests to the external webpages (i.e. with the correct hostname given in HTTP request header). 

I have been going though docs, but havent been able to see the solution. Can anyone help me?

Regards,

Jørund Vier Skriubakken

---------------------------------------------------------------------
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] Newbe: virtual host setup

Posted by Robert Andersson <ro...@profundis.nu>.
Jørund Skriubakken wrote:
> I have a virtualhost setup; one for the external webpages and
> another for the internal webpages.I want to restrict access so
> that requests through the public IP address only allows requests
> to the external webpages (i.e. with the correct hostname given in
> HTTP request header).

Could this configuration possibly work?

    # Use NBVH on public interface
    NameVirtualHost 123.45.67.78
    # Use NBVH on private interface
    NameVirtualHost 192.0.0.2

    # Public web-site
    <VirtualHost *>
        ServerName www.public-site.com
        ...
    </VirtualHost>

    # Private web-site
    <VirtualHost 192.0.0.2>
        ServerName private-site
        ...
    </VirtualHost>

I deem it would make private-site unreachable from the public interface.

Regards,
Robert Andersson


---------------------------------------------------------------------
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