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

We run multiple sites off one server using vhosts. On one Friday night, we found ourselves with an issue where we needed to kill outside access to all the sites. At the time, we found ourselves altering every vhosts config to kill outside access.

Is there a way to limit all sites running on vhosts to only be accessible from one IP (our office IP) without having to alter each of their configs?

share|improve this question
up vote 0 down vote accepted

Don't put your settings in a VirtualHost section. This way, they will be applicable to all Vhosts.

  • Settings in a VirtualHost section apply to the concerned Vhost.
  • Settings in the global section apply to all the vhosts.
share|improve this answer

Have each vhost include the same file which contains the blocking settings.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.