Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Ubuntu Server (with Ubuntu Desktop GUI running) on my server computer. I would like to have 2 different sites running together on Apache, which came with Ubuntu Server. One site would have to be an intranet site, so it will only be accessible through any device connected to the same internet router, and an internet site, which will be accessible to anyone who has my IP. I am new to this, so please try to give a detailed description.

share|improve this question

migrated from May 22 '11 at 17:33

This question came from our site for computer enthusiasts and power users.

There are a few ways to do this. They all center around blocking access by IP.

One way is to configure Apache to allow only IPs from your intranet using mod_access. In your vhost file (located in sites-available), add the following:

Order Deny,Allow
Deny from all
Allow from *your_ip_subset*

The IP subset can be a partial IP address, a network/netmask pair, or a network/nnn CIDR. Read about mod-access at:

Another way to do this is to assign two different IPs to your server and then assign one IP each to your two sites. Now you can configure your router to block requests for the intranet IP unless the requests are coming from your desired IPs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.