On Wed, Apr 20, 2011 at 11:31 AM, amrit pal pathak <
[email protected]> wrote:

>
>
> On Apr 20, 8:51 am, Bryan Crossland <[email protected]> wrote:
> > On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak <
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > [email protected]> wrote:
> >
> > > On Apr 19, 4:09 am, Alexander <[email protected]> wrote:
> > > > Open your /etc/hosts file in Linux. Windows is the same hosts file
> under
> > > > some other directory.
> > > > Any how puts the next line in the file
> > > > 127.0.0.1 example.com
> > > > Then if you "ping example.com" IP 127.0.0.1 will respond.
> > > > now you can use example.com:3000 to access your web site.
> >
> > >        Thanks .It helped me.
> > > > If you are not happy with your 3000 port then change Rails default
> http
> > > port
> > > > setting.
> > > > I don't know how to change this port number.
> >
> > > > It's possible with iptables.
> > > > Try out these rules:
> >
> > > > sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.0/8 -j
> > > REDIRECT
> > > > --to-port 3000
> > > > sudo iptables -t nat -A OUTPUT -p tcp --dport 8080 -d 127.0.0.0/8 -j
> > > > REDIRECT --to-port 80
> >
> > > > First rule will redirect all local traffic from 80 to 3000.
> > > > The second will redirect 8080 to 80, to allow you access phpmyadmin
> or
> > > > whatever you have on 80 port.
> >
> > > > Tested on Ubuntu.
> >
> > >      Both exectued sussfully.Now can i access,rails application
> > > without port number 3000?
> > >        If yes,what to do next?
> >
> > Here you go. Amazing what you find on the Internet these days.
> >
> > http://tinyurl.com/3bp7nsh
>        It tells to run the app on different ports,but i want to run it
> without giving any port like at "example.com"
>
>
Basics of the internet. http requests default to port 80. example.com is
responding on port 80. Set you app to run on port 80.

B.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to