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

I have an Ubuntu server hosting example1.com and example2.com. 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 example1.com.

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

How on earth is this done?

share|improve this question

1 Answer 1

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
2  
@budwiser - you need a beer (hopefully of better quality than your namesake, though). –  EEAA Feb 24 '12 at 20:43

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.