# Index start page

**URL:** <https://www.ruby-forum.com/t/index-start-page/97911>\
**Category:** Rails\
**Created:** [July 11, 2006, 11:51am UTC](https://www.ruby-forum.com/t/index-start-page/97911 "2006-07-11T11:51:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 11, 2006, 11:51am UTC](https://www.ruby-forum.com/t/index-start-page/97911/1 "2006-07-11T11:51:44Z")

</div>

How do a set a main start page? I understand that index is the start  
action in a controller, and going to the controller name will show that  
index page. But can you set an index to be a start page from root, so  
when you enter [domain.com:3000](http://domain.com:3000) it will show up? I tried to add def index  
to the main controller application.rb but no luck.

Btw, how do deal with this when hosting several solutions, via Apache2,  
and removing the port nr like [www.domain.com](http://www.domain.com)?

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 11, 2006, 1:02pm UTC](https://www.ruby-forum.com/t/index-start-page/97911/2 "2006-07-11T13:02:34Z")

</div>

PÃ¥l BergstrÃ¶m wrote:

> How do a set a main start page? I understand that index is the start  
> action in a controller, and going to the controller name will show that  
> index page. But can you set an index to be a start page from root, so  
> when you enter [domain.com:3000](http://domain.com:3000) it will show up? I tried to add def index  
> to the main controller application.rb but no luck.

Read the comments in config/routes.rb

> Btw, how do deal with this when hosting several solutions, via Apache2,  
> and removing the port nr like [www.domain.com](http://www.domain.com)?

If your app is being served off port 80, then your URLs won’t have a  
port number in them. Nothing changes in the app.

As for serving multiple apps off a single server, by far the simplest  
way is to put each app on a separate virtual host, eg. [foo.domain.com](http://foo.domain.com),  
[bar.domain.com](http://bar.domain.com), [baz.domain.com](http://baz.domain.com). See the Apache docs for more info.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 11, 2006, 3:37pm UTC](https://www.ruby-forum.com/t/index-start-page/97911/3 "2006-07-11T15:37:39Z")

</div>

Steve K. wrote:

> PÃ¥l BergstrÃ¶m wrote:
> 
> > How do a set a main start page? I understand that index is the start  
> > action in a controller, and going to the controller name will show that  
> > index page. But can you set an index to be a start page from root, so  
> > when you enter [domain.com:3000](http://domain.com:3000) it will show up? I tried to add def index  
> > to the main controller application.rb but no luck.
> 
> Read the comments in config/routes.rb
> 
> > Btw, how do deal with this when hosting several solutions, via Apache2,  
> > and removing the port nr like [www.domain.com](http://www.domain.com)?
> 
> If your app is being served off port 80, then your URLs won’t have a  
> port number in them. Nothing changes in the app.
> 
> As for serving multiple apps off a single server, by far the simplest  
> way is to put each app on a separate virtual host, eg. [foo.domain.com](http://foo.domain.com),  
> [bar.domain.com](http://bar.domain.com), [baz.domain.com](http://baz.domain.com). See the Apache docs for more info.

Thanks. Got it. Of course, the RoR “Welcome aboard” page is the current  
index page !
