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 have Zimbra 8.0.3 OS edition server. Our server has several A-entries in DNS-server. Let's suppose they are aaa.mydomain.com, bbb.mydomain.com and ccc.mydomain.com. Could anybody say what I should do to redirect users to page 404 when they use bbb.mydomain.com, ccc.mydomain.com and server IP-address but give them access to mail web-client if they use aaa.mydomain.com?

Thanks in advance.

share|improve this question
    
Sorry. I forgot to tell I was using Jetty. –  ArtRet May 24 '13 at 15:27
    
Do you really want a 404 or to redirect them to the right location using a 302 redirect? Also is jetty out in front or is apache in the mix somewhere? You will need to pick where you want to handle the redirects or 404. –  jeffatrackaid May 24 '13 at 16:20
    
I don't really know if jetty is behind apache or not in zimbra. I haven't much experience with web servers. And yes, I want 404 page to be used. –  ArtRet May 24 '13 at 17:01

2 Answers 2

You could do something like this:

  RewriteEngine on
  RewriteCond %{HTTP_REFERER} ^bbb.mydomain\.com$ [NC]
  RewriteRule .*  - [R=404]

You could also try a general forbidden error, like this:

  order allow,deny
  deny from bbb.mydomain.com
  allow from all
share|improve this answer
    
Sorry! I didn't tell that I was using Jetty =) –  ArtRet May 24 '13 at 15:30
    
as far as I know zimbra use Jetty behind Apache . –  Abhishek Anand Amralkar May 24 '13 at 15:42
    
I'm not sure, but it seems they are independent in Zimbra. –  ArtRet May 27 '13 at 19:44
up vote 0 down vote accepted

So I have solved this problem. You should add following lines into jetty.xml.in in directive < New id="zimbra" class="org.eclipse.jetty.webapp.WebAppContext" >...< /New> :

   <Set name="virtualHosts">
       <Array type="java.lang.String">
         <Item>aaa.mydomain.com</Item>
       </Array>
   </Set>

Thanks everyone =)

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.