On Apr 19, 4:09 am, Alexander <cutal...@gmail.com> 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?


Thanks

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to