Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am a newbie and need some help although I tried going through the other posts. I have successfully installed my drupal site in /var/www/mywebsite folder.

Now I went to the place from where I bought my domain ( and configured an A record to point to the Elastic IP Address allocated by Amazone to this instance. Everything is fine a nice here. When I browse for it correctly takes me to the default page in /var/www

But obviously I need to point that website to /var/www/mywebsite. When I enter the link ... it goes to the right page and everything seems to work fine.

Now what I want to do is point and to the /var/www/mywebsite folder

And it would be great if I could have another site called and I configure it to the same IP but the redirection for and to /var/www/yourwebsite

Please help! I understand that the issue has something to with VirtualHosts and mod_rewrite .. but sorry ... I'm a bit stuck and rather new! HELP! :(

share|improve this question
Sorry .. I think I figured out atleast partially which is good enough for a start. I will appreciate if anyone could warn me of things I may be missing (if any).I added the below to the httpd.conf file and atleast one site is up and running! <VirtualHost *:80> ServerName ServerAlias * UseCanonicalName Off ServerAdmin DocumentRoot /var/www/mywebsite/ </VirtualHost> <Directory /var/www/mywebsite/> Options +FollowSymLinks AllowOverride All order allow,deny allow from all </Directory> – user75700 Mar 24 '11 at 15:28

What you suggested is exactly right. The httpd.conf is not the best place to put this, you should go to:

cd /etc/apache2/sites-available

in there, copy 000-default to

edit it, e.g.


Adjust the details as you suggested in your question (Insert)

Save (Escape, :w, enter)

Quit vi (Escape, :q,enter)

Finally, type:


apache2ctl restart and you should have it.

share|improve this answer

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.