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 need to point to

How can I do that?

share|improve this question
You should tell us the protocol using to access this folder! HTTP, samba share, etc.. – Khaled Feb 12 '11 at 10:03
http [... 15 char] – gAMBOOKa Feb 12 '11 at 10:04
up vote 5 down vote accepted

You cannot do this through etc hosts. You are mixing up 2 different protocols here, http and dns. /etc/hosts will help you redirect to, but you need to the redirection to /admin on the web server.

If you are using apache you want to likely used named virtual hosts

Port 80
ServerName server.domain.tld


DocumentRoot /www/domain
ServerName www.domain.tld

DocumentRoot /www/subdomain
ServerName www.sub.domain.tld

This article outlines this:

share|improve this answer
Hmm.. how can I do this then? I want pointing to one directory, and a pointing to another? – gAMBOOKa Feb 12 '11 at 10:18
added to my entry - thats for apache let me know if you are using IIS on the webserver. Also keep in mind that debian/ubuntu/cent also sometimes use their own configuration files. More information on what your setup is will help advise on how to help – pablo Feb 12 '11 at 12:35

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.