amrit pal pathak
2011-Apr-18 09:51 UTC
How to change the url (from localhostL:3000) to (example.com)
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at "example.com" in brower when i start the serve normally as "script/ server" . What to do? 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-18 09:51 UTC
How to change the url (from localhostL:3000) to (example.com)
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at "example.com" in brower when i start the serve normally as "script/ server" . What to do? 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-18 09:53 UTC
How to change the url (from localhostL:3000) to (example.com)
I am new to ruby on rails and running rails 2.3.5.My application is running at localhost:3000 ,but i want it should be run at "example.com" in brower when i start the serve normally as "script/ server" . What to do? 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Peter De Berdt
2011-Apr-18 11:03 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
On 18 Apr 2011, at 11:51, amrit pal pathak wrote:> I am new to ruby on rails and running rails 2.3.5.My application is > running at localhost:3000 ,but i want it should be run at > "example.com" in brower when i start the serve normally as "script/ > server" . > What to do?1. Learn about DNS 2. Learn about DNS applied to the operating system you are running 3. Add the domain to the DNS 4. Learn how to host your rails app on a privileged port In any case, your question is not even close to being within the Rails scope and thus doesn''t belong on this list. If you''re on a Linux-based OS, you might want to look into http://pow.cx/ Also (since I don''t want to be posting on just about every message you''ve posted in the last two hours), if I were you, I would start reading up on Rails itself and how to use it or you''ll just run into a brick wall all the time and keep asking basic questions that are actually in the guides, API and just about every "Rails for dummies"- like book out there. Best regards Peter De Berdt -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tom Ricks
2011-Apr-18 21:39 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
I am very new to rails as well, but I am pretty sure that''s not possible in development mode, and why would you want to do it, developing under local is much faster than having to update your server files every time. You would have to deploy it to change the url that its under, like get a server. Or you can just play around with Heroku, they offer free deployment for testing. http://www.heroku.com/ -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Alex Katebi
2011-Apr-19 04:43 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
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. 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. On Mon, Apr 18, 2011 at 5:51 AM, amrit pal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am new to ruby on rails and running rails 2.3.5.My application is > running at localhost:3000 ,but i want it should be run at > "example.com" in brower when i start the serve normally as "script/ > server" . > What to do? > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Alexander
2011-Apr-19 08:09 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
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. 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. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-19 15:57 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bryan Crossland
2011-Apr-20 12:51 UTC
Re: Re: How to change the url (from localhostL:3000) to (example.com)
On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak < amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-20 16:31 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 20, 8:51 am, Bryan Crossland <bacrossl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak < > > > > > > > > > > amritpalpath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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/3bp7nshIt tells to run the app on different ports,but i want to run it without giving any port like at "example.com" -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bryan Crossland
2011-Apr-20 16:44 UTC
Re: Re: How to change the url (from localhostL:3000) to (example.com)
On Wed, Apr 20, 2011 at 11:31 AM, amrit pal pathak < amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Apr 20, 8:51 am, Bryan Crossland <bacrossl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Tue, Apr 19, 2011 at 10:57 AM, amrit pal pathak < > > > > > > > > > > > > > > > > > > > > amritpalpath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Apr-20 16:55 UTC
Re: Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 20, 2011, at 12:31 PM, amrit pal pathak wrote:>> 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"That''s an implementation detail. All of the (non-secure) Web sites you visit that don''t show a port use the *default* port 80. If you want to be completely pedantic, the URL for the Apple home page is http://www.apple.com:80/index.html. But when you type in www.apple.com , your browser first takes the leap of faith that you mean http:// (since it is a browser, after all) and then further assumes that you mean port 80, because you didn''t top your URL with https:// or tail the domain with :443. Then, because you didn''t enter a filename, the Apache server (or whatever they use there) looks up the DefaultIndex and fills that in for you, and performs a silent redirect (it doesn''t tell you the exact details, so it could just as easily be index.php or index.erb or anything at all) to whatever that actual index file is, and THEN starts filling the sub-requests contained in that index file. You can read a lot more about this at the Apache site, in the httpd project documentation. Pick the version you use there, and read up on mod_rewrite and its cousins. Short answer, you can do this, it''s done every day, and it''s not that difficult. Slightly longer answer, you still haven''t given any good reason why you would want to do this in the development environment. But have you looked at http://pow.cx/ for no-config local network hosting with a "real" domain? Walter -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-21 14:35 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 20, 12:55 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> On Apr 20, 2011, at 12:31 PM, amrit pal pathak wrote: > > >> 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" > > That''s an implementation detail. All of the (non-secure) Web sites you > visit that don''t show a port use the *default* port 80. > > If you want to be completely pedantic, the URL for the Apple home page > ishttp://www.apple.com:80/index.html. But when you type inwww.apple.com > , your browser first takes the leap of faith that you mean http:// > (since it is a browser, after all) and then further assumes that you > mean port 80, because you didn''t top your URL with https:// or tail > the domain with :443. Then, because you didn''t enter a filename, the > Apache server (or whatever they use there) looks up the DefaultIndex > and fills that in for you, and performs a silent redirect (it doesn''t > tell you the exact details, so it could just as easily be index.php or > index.erb or anything at all) to whatever that actual index file is, > and THEN starts filling the sub-requests contained in that index file. > > You can read a lot more about this at the Apache site, in the httpd > project documentation. Pick the version you use there, and read up on > mod_rewrite and its cousins. > > Short answer, you can do this, it''s done every day, and it''s not that > difficult. Slightly longer answer, you still haven''t given any good > reason why you would want to do this in the development environment. > But have you looked athttp://pow.cx/for no-config local network > hosting with a "real" domain? >Pow is just for Mac .I am running ubuntu 10.04,so unable to install and config it . Any solution?alternative? 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Alex Katebi
2011-Apr-21 15:54 UTC
Re: Re: How to change the url (from localhostL:3000) to (example.com)
Start your rails server with http default port 80: rails server -p 80 Now example.com should work. I don''t why people write three pages of information without answering you anything :) On Tue, Apr 19, 2011 at 11:57 AM, amrit pal pathak < amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Alex Katebi
2011-Apr-21 16:03 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
Should we get a BS or a PHD in DNS? When did you become a cyber cop? On Mon, Apr 18, 2011 at 7:03 AM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org>wrote:> > On 18 Apr 2011, at 11:51, amrit pal pathak wrote: > > I am new to ruby on rails and running rails 2.3.5.My application is > running at localhost:3000 ,but i want it should be run at > "example.com" in brower when i start the serve normally as "script/ > server" . > What to do? > > > 1. Learn about DNS > 2. Learn about DNS applied to the operating system you are running > 3. Add the domain to the DNS > 4. Learn how to host your rails app on a privileged port > > In any case, your question is not even close to being within the Rails > scope and thus doesn''t belong on this list. > > If you''re on a Linux-based OS, you might want to look into http://pow.cx/ > > Also (since I don''t want to be posting on just about every message you''ve > posted in the last two hours), if I were you, I would start reading up on > Rails itself and how to use it or you''ll just run into a brick wall all the > time and keep asking basic questions that are actually in the guides, API > and just about every "Rails for dummies"-like book out there. > > > Best regards > > > Peter De Berdt > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Manoj Sachwani
2011-Apr-21 18:54 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
Thanks Alex, that helps a lot :) Simple isn''t it rails server -p 80 :P Thanks again, any idea how I can achieve subdomains like basecamp does? username.basecamphq.com On Apr 21, 8:54 pm, Alex Katebi <alex.kat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Start your rails server with http default port 80: > rails server -p 80 > Now example.com should work. > I don''t why people write three pages of information without answering you > anything :) > > On Tue, Apr 19, 2011 at 11:57 AM, amrit pal pathak < > > > > > > > > amritpalpath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
PsiPro
2011-Apr-21 19:08 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
http://railscasts.com/episodes/221-subdomains-in-rails-3 I didn''t read all the basic DNS questions, but hopefully somebody pointed out that example.com won''t be accessible externally. On Apr 21, 2:54 pm, Manoj Sachwani <manoj.sachw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks Alex, that helps a lot :) Simple isn''t it rails server -p 80 :P > Thanks again, any idea how I can achieve subdomains like basecamp > does? username.basecamphq.com > > On Apr 21, 8:54 pm, Alex Katebi <alex.kat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Start your rails server with http default port 80: > > rails server -p 80 > > Now example.com should work. > > I don''t why people write three pages of information without answering you > > anything :) > > > On Tue, Apr 19, 2011 at 11:57 AM, amrit pal pathak < > > > amritpalpath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Alex Katebi
2011-Apr-21 19:13 UTC
Re: Re: How to change the url (from localhostL:3000) to (example.com)
Manoj, I am glad that worked for you. Take a look at this railscast for rails 3 subdomains http://railscasts.com/episodes/221-subdomains-in-rails-3 Thanks, Alex On Thu, Apr 21, 2011 at 2:54 PM, Manoj Sachwani <manoj.sachwani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Thanks Alex, that helps a lot :) Simple isn''t it rails server -p 80 :P > Thanks again, any idea how I can achieve subdomains like basecamp > does? username.basecamphq.com > > On Apr 21, 8:54 pm, Alex Katebi <alex.kat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Start your rails server with http default port 80: > > rails server -p 80 > > Now example.com should work. > > I don''t why people write three pages of information without answering you > > anything :) > > > > On Tue, Apr 19, 2011 at 11:57 AM, amrit pal pathak < > > > > > > > > > > > > > > > > amritpalpath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > > > To unsubscribe from this group, send email to > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Bryan Crossland
2011-Apr-22 01:46 UTC
Re: Re: How to change the url (from localhostL:3000) to (example.com)
Sent from my iPhone On Apr 21, 2011, at 10:54 AM, Alex Katebi <alex.katebi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Start your rails server with http default port 80: > rails server -p 80 > Now example.com should work. > I don''t why people write three pages of information without answering you anything :) >Because if you give a man a fish you feed him for a day. If you teach him to fish you feed him for life. The answer was in all the information provided and so was the answers to all the basic follow up questions. B.> On Tue, Apr 19, 2011 at 11:57 AM, amrit pal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Apr 19, 4:09 am, Alexander <cutal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-22 11:58 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 21, 11:54 am, Alex Katebi <alex.kat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Start your rails server with http default port 80: > rails server -p 80 > Now example.com should work. > I don''t why people write three pages of information without answering you > anything :)Thank you very much. It helped -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
amrit pal pathak
2011-Apr-22 13:20 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
On Apr 22, 7:58 am, amrit pal pathak <amritpalpath...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Apr 21, 11:54 am, Alex Katebi <alex.kat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Start your rails server with http default port 80: > > rails server -p 80 > > Now example.com should work. > > I don''t why people write three pages of information without answering you > > anything :)i dont know why but "script/server -p 80" gives error me now as amrit@ubuntu:~/amritdemo$ script/server -p 80 => Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:80 => Call with -d to detach => Ctrl-C to shutdown server [2011-04-22 09:20:01] INFO WEBrick 1.3.1 [2011-04-22 09:20:01] INFO ruby 1.8.7 (2010-01-10) [i486-linux] [2011-04-22 09:20:06] WARN TCPServer Error: Permission denied - bind(2) Exiting /usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize'': Permission denied - bind(2) (Errno::EACCES) from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'' from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'' from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'' from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'' from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'' from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'' from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'' from /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/ webrick.rb:10:in `new'' from /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/ webrick.rb:10:in `run'' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb: 111 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from script/server:3 why? 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Kendall Gifford
2011-Apr-22 15:50 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
> > i dont know why but "script/server -p 80" gives error me now as > > amrit@ubuntu:~/amritdemo$ script/server -p 80 > => Booting WEBrick > => Rails 2.3.5 application starting on http://0.0.0.0:80 > => Call with -d to detach > => Ctrl-C to shutdown server > [2011-04-22 09:20:01] INFO WEBrick 1.3.1 > [2011-04-22 09:20:01] INFO ruby 1.8.7 (2010-01-10) [i486-linux] > [2011-04-22 09:20:06] WARN TCPServer Error: Permission denied - > bind(2) > Exiting > /usr/lib/ruby/1.8/webrick/utils.rb:73:in `initialize'': Permission > denied - bind(2) (Errno::EACCES) > from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `new'' > from /usr/lib/ruby/1.8/webrick/utils.rb:73:in `create_listeners'' > from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `each'' > from /usr/lib/ruby/1.8/webrick/utils.rb:70:in `create_listeners'' > from /usr/lib/ruby/1.8/webrick/server.rb:75:in `listen'' > from /usr/lib/ruby/1.8/webrick/server.rb:63:in `initialize'' > from /usr/lib/ruby/1.8/webrick/httpserver.rb:24:in `initialize'' > from /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/ > webrick.rb:10:in `new'' > from /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/ > webrick.rb:10:in `run'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb: > 111 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > from script/server:3 > > > why? > >Linux/un*x systems require root privileges in order for a process to bind to "privileged" ports (any port number lower than 1024 (which is why rails and most other "development" and "testing" -mode processes use higher-numbered ports like 3000). If you really want to run your rails app on port 80 using the command above, you''ll likely need to use "sudo": sudo script/server -p 8 However, if you''re using RVM to manage your ruby and rubygems collections then you''d use its sudo wrapper "rvmsudo" that retains your "ruby environment" settings. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
radhames brito
2011-Apr-23 00:28 UTC
Re: Re: How to change the url (from localhostL:3000) to (example.com)
Edit the host file of your os to make example.com point a 127.0.0.1 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
John Griffiths
2013-Mar-13 03:30 UTC
Re: How to change the url (from localhostL:3000) to (example.com)
this''ll do it. basically redirects port 80 to port 3000 sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.1/8 -j REDIRECT --to-port 3000 tested and works -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.