Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.