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 an Ubuntu server hosting and Both names are pointing to the same IP address.

I've configured Apache and it's working ok by using /var/www/example1 for the first and /var/www/example2 to the second domain.

What I would like to achieve next is to disallow all other service requests on both domain, except allowing SSH connections to

What I would like to achieve next is to allow SSH connections only to

How on earth is this done?

share|improve this question
up vote 6 down vote accepted

There's no simple sshd equivalent to apache's VirtualHosts.

Typically what you'll need to do, though, is configure the ssh settings for each user to chroot them into a single folder hierarchy.

Regarding your other question, what exactly do you mean by "disallow all other service requests"?

share|improve this answer
Never mind. My mind is flowing too quickly after a loooong day at work. I'm not going to even bother to try to explain what I was thinking while writing that because it wouldn't make sense anyway. But thank you for answering. :) – budwiser Feb 24 '12 at 19:57
@budwiser - you need a beer (hopefully of better quality than your namesake, though). – EEAA Feb 24 '12 at 20:43

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.