Index start page

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 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?

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 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?

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,
bar.domain.com, baz.domain.com. See the Apache docs for more info.

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 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?

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,
bar.domain.com, 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 !