# How can I run URLwithout using port?

**URL:** <https://www.ruby-forum.com/t/how-can-i-run-urlwithout-using-port/196732>\
**Category:** Rails\
**Created:** [July 1, 2008, 2:04pm UTC](https://www.ruby-forum.com/t/how-can-i-run-urlwithout-using-port/196732 "2008-07-01T14:04:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zangsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/a5b964/32.png) [@zangsdev](https://www.ruby-forum.com/u/zangsdev)\
**Post date:** [July 1, 2008, 2:04pm UTC](https://www.ruby-forum.com/t/how-can-i-run-urlwithout-using-port/196732/1 "2008-07-01T14:04:34Z")

</div>

Hello,

I have developed 2-3 sample ruby application…

and my server name is like [http://www.mydomain.com](http://www.mydomain.com)

Now when I run one of my the ruby application say “first\_app”,  
then I have to use [http://www.mydomain.com:3000/](http://www.mydomain.com:3000/)

And for the 2nd application I have shutdown the service for first one  
and then have to start service for 2nd app.  
And have to use same url [http://www.mydomain.com:3000/](http://www.mydomain.com:3000/)

Any one can help me what should I do if I want to run the url like  
[http://www.mydomain.com/first\_app](http://www.mydomain.com/first_app)

[http://www.mydomain.com/second\_app](http://www.mydomain.com/second_app)

Please help me… I really need this asap…

Thanks in Advance

Regards  
Zangs D.

---

<div class="post-metadata">

**Author:** ![zangsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/a5b964/32.png) [@zangsdev](https://www.ruby-forum.com/u/zangsdev)\
**Post date:** [July 1, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/how-can-i-run-urlwithout-using-port/196732/2 "2008-07-01T14:15:11Z")

</div>

You can always assign the port to use… :3000 is just the default.

ruby script/server --port=3000 for the first app  
ruby script/server --port=3001 for the next  
etc, etc

---

<div class="post-metadata">

**Author:** ![zangsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/a5b964/32.png) [@zangsdev](https://www.ruby-forum.com/u/zangsdev)\
**Post date:** [July 1, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/how-can-i-run-urlwithout-using-port/196732/3 "2008-07-01T15:53:14Z")

</div>

Also, have a look at Rack, its a http hub for any app (rails or not)

---

<div class="post-metadata">

**Author:** ![zangsdev](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/a5b964/32.png) [@zangsdev](https://www.ruby-forum.com/u/zangsdev)\
**Post date:** [July 1, 2008, 2:18pm UTC](https://www.ruby-forum.com/t/how-can-i-run-urlwithout-using-port/196732/4 "2008-07-01T14:18:40Z")

</div>

On Jul 1, 7:27 am, Zangs D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Any one can help me what should I do if I want to run the url likehttp://www.mydomain.com/first\_app  
> [http://www.mydomain.com/second\_app](http://www.mydomain.com/second_app)

You need to do virtual hosting for this. I suggest you look into  
setting up Nginx ([http://wiki.codemongers.com/Main](http://wiki.codemongers.com/Main)) with some mongrel  
clusters in the back.  
Google has a ton of how-tos.
