# How to create Virtual Host In Apache

**URL:** <https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814>\
**Category:** Rails\
**Created:** [November 21, 2008, 1:19pm UTC](https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814 "2008-11-21T13:19:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piyush\_with\_Rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Post date:** [November 21, 2008, 1:19pm UTC](https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814/1 "2008-11-21T13:19:19Z")

</div>

Hi All,

I am new to server configurations in apache web server.

I want to learn how to create virtual hosts in apache server and run  
configure domains and making domain up.

Can anyone guide me here or provide me some useful links ?

Thanks,

Piyush

---

<div class="post-metadata">

**Author:** ![Piyush\_with\_Rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Post date:** [November 21, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814/2 "2008-11-21T13:28:42Z")

</div>

If you go to use Passenger (mod\_rails) the process is very simple,  
just follow these instructions:

[http://www.modrails.com/install.html](http://www.modrails.com/install.html)

😃

- Sorry the english, I’m Brazilian

---

<div class="post-metadata">

**Author:** ![Piyush\_with\_Rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Post date:** [November 21, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814/3 "2008-11-21T18:58:05Z")

</div>

I would recommend SliceHost’s articles on anything from Ruby on Rails  
installations to Apache configurations to get a handle on things.

[http://articles.slicehost.com/](http://articles.slicehost.com/)

---

<div class="post-metadata">

**Author:** ![Piyush\_with\_Rails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ec9cab/32.png) [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Post date:** [November 21, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/how-to-create-virtual-host-in-apache/153814/4 "2008-11-21T23:38:47Z")

</div>

Everytime i look for articles about Apache and rails application i  
always  
find the same…

what i need is:

i have a normal application at a real folder at “folder1” to be servered  
by  
apache, so i go to browser type ip/folder1 and everything is fine!

But now, i want to server a rails applications, and if a create a  
virtalhost  
the url ip/folder1 is no longer avaliable…

So, i need to be able to do 3 things:

1. when i browse the server\_ip is to show up the apache default index

2. when i browse the server\_ip/folder1 is to show up the html that is  
already working

3. when i browse the server\_ip/rails\_app is to show up the rails app  
servered by webrick or mongrel

Any hint about that?

Thanks, guys!
