[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How can I run url without using port ?

Zangs Dev

6/30/2008 1:05:00 PM

Hello,

I have developed 2-3 sample ruby application...

and my server name is like http://www.my...

Now when I run one of my the ruby application say "first_app",
then I have to use http://www.my...: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.my...:3000/

Any one can help me what should I do if I want to run the url like
http://www.my.../first_app

http://www.my.../second_app


Please help me.. I really need this asap...

Thanks in Advance

Regards
Zangs Dev
--
Posted via http://www.ruby-....

8 Answers

Zangs Dev

7/1/2008 10:05:00 AM

0

Hello all

no one here have the ability to help me ?


Zangs Dev wrote:
> Hello,
>
> I have developed 2-3 sample ruby application...
>
> and my server name is like http://www.my...
>
> Now when I run one of my the ruby application say "first_app",
> then I have to use http://www.my...: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.my...:3000/
>
> Any one can help me what should I do if I want to run the url like
> http://www.my.../first_app
>
> http://www.my.../second_app
>
>
> Please help me.. I really need this asap...
>
> Thanks in Advance
>
> Regards
> Zangs Dev

--
Posted via http://www.ruby-....

Jano Svitok

7/1/2008 10:36:00 AM

0

On Tue, Jul 1, 2008 at 12:04, Zangs Dev <zangs.dev@gmail.com> wrote:
> Zangs Dev wrote:
>> Hello,
>>
>> I have developed 2-3 sample ruby application...
>>
>> and my server name is like http://www.my...
>>
>> Now when I run one of my the ruby application say "first_app",
>> then I have to use http://www.my...: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.my...:3000/
>>
>> Any one can help me what should I do if I want to run the url like
>> http://www.my.../first_app
>>
>> http://www.my.../second_app

Hi,

1. is your application written in Ruby ON RAILS? This question is
important because
there are many frameworks for this and the solution to your problem
depends on the framwork used.

2. If it is rails indeed, you might want to check Rails-specific forum
(google for rails-talk)
There are people with specific knowledge that can help you better.

3. If it is rails: for start, edit your environment.rb so that you use
different ports for your apps. 3000 for the first,
3001 for the second, etc. To use /first_app, etc. you need to have
another server proxying the requests to your apps.
There are a lot of tutorials out there. GIYF, keywords: rails multiple
apps, more keywords: mongrel, reverse proxy, load balancer, ngnix,
lighttpd

J.

Zangs Dev

7/1/2008 10:47:00 AM

0

Thanks Jano for the reply and help...

My application is written in Ruby ON RAILS...

My problem is... I don't want to use port anymore in my url...

for ex. I want to run my sites like >>
http://www.mydomain.com...
OR
http://www.myd...

Without using port... So please help me..

Thanks again...

Jano Svitok wrote:
> On Tue, Jul 1, 2008 at 12:04, Zangs Dev <zangs.dev@gmail.com> wrote:
>>> 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...
>>>
>>> Any one can help me what should I do if I want to run the url like
>>> http://www.mydomain.com...
>>>
>>> http://www.myd...second_app
>
> Hi,
>
> 1. is your application written in Ruby ON RAILS? This question is
> important because
> there are many frameworks for this and the solution to your problem
> depends on the framwork used.
>
> 2. If it is rails indeed, you might want to check Rails-specific forum
> (google for rails-talk)
> There are people with specific knowledge that can help you better.
>
> 3. If it is rails: for start, edit your environment.rb so that you use
> different ports for your apps. 3000 for the first,
> 3001 for the second, etc. To use /first_app, etc. you need to have
> another server proxying the requests to your apps.
> There are a lot of tutorials out there. GIYF, keywords: rails multiple
> apps, more keywords: mongrel, reverse proxy, load balancer, ngnix,
> lighttpd
>
> J.

--
Posted via http://www.ruby-....

Jano Svitok

7/1/2008 10:59:00 AM

0

On Tue, Jul 1, 2008 at 12:46, Zangs Dev <zangs.dev@gmail.com> wrote:
> Thanks Jano for the reply and help...
>
> My application is written in Ruby ON RAILS...
>
> My problem is... I don't want to use port anymore in my url...
>
> for ex. I want to run my sites like >>
> http://www.mydomain.com...
> OR
> http://www.myd...

>> To use /first_app, etc. you need to have
>> another server proxying the requests to your apps.
>> There are a lot of tutorials out there. GIYF[1], keywords: rails multiple
>> apps, more keywords: mongrel, reverse proxy, load balancer, ngnix,
>> lighttpd

[1] google.com
http://wiki.rubyonrails.com/rails/pages/Howtos#...
http://wiki.rubyonrails.com/rails/pages/HowToInstallApplicationsInSubd...

The thing is not easy to do, and depends on lots of other things -
your webserver, how do you run your rails apps,
etc. so the best way is to go through the docs on rails site, and
google some tutorials (there are plenty of them),
and if that doesn't help, try asking on the rails forum. As I said,
there are more knowledgable people.
I don't do much with rails, so I can only show you where to look. They
will know first-hand (just don't forget to do
your homework before you ask!)

Good luck!

Zangs Dev

7/1/2008 11:08:00 AM

0

Thanks so much again...

Now I will try in google and rails forum....


> [1] google.com
> http://wiki.rubyonrails.com/rails/pages/Howtos#...
> http://wiki.rubyonrails.com/rails/pages/HowToInstallApplicationsInSubd...
>
> The thing is not easy to do, and depends on lots of other things -
> your webserver, how do you run your rails apps,
> etc. so the best way is to go through the docs on rails site, and
> google some tutorials (there are plenty of them),
> and if that doesn't help, try asking on the rails forum. As I said,
> there are more knowledgable people.
> I don't do much with rails, so I can only show you where to look. They
> will know first-hand (just don't forget to do
> your homework before you ask!)
>
> Good luck!
--
Posted via http://www.ruby-....

Ron Fox

7/1/2008 11:36:00 AM

0

Use port 80 if you just want to test with URL's that don't have ports.


Zangs Dev wrote:
> Thanks so much again...
>
> Now I will try in google and rails forum....
>
>
>> [1] google.com
>> http://wiki.rubyonrails.com/rails/pages/Howtos#...
>> http://wiki.rubyonrails.com/rails/pages/HowToInstallApplicationsInSubd...
>>
>> The thing is not easy to do, and depends on lots of other things -
>> your webserver, how do you run your rails apps,
>> etc. so the best way is to go through the docs on rails site, and
>> google some tutorials (there are plenty of them),
>> and if that doesn't help, try asking on the rails forum. As I said,
>> there are more knowledgable people.
>> I don't do much with rails, so I can only show you where to look. They
>> will know first-hand (just don't forget to do
>> your homework before you ask!)
>>
>> Good luck!


--
Ron Fox
NSCL
Michigan State University
East Lansing, MI 48824-1321

Zangs Dev

7/1/2008 12:00:00 PM

0

On Jul 1, 4:35 pm, Ron Fox <fox@nscl.msu.edu> wrote:
> Use port 80 if you just want to test with URL's that don't have ports.
>
>
>
>
>
> Zangs Dev wrote:
> > Thanks so much again...
>
> > Now I will try in google and rails forum....
>
> >> [1] google.com
> >>http://wiki.rubyonrails.com/rails/pages/Howtos#...
> >>http://wiki.rubyonrails.com/rails/pages/HowToInstallApplica......
>
> >> The thing is not easy to do, and depends on lots of other things -
> >> your webserver, how do you run your rails apps,
> >> etc. so the best way is to go through the docs on rails site, and
> >> google some tutorials (there are plenty of them),
> >> and if that doesn't help, try asking on the rails forum. As I said,
> >> there are more knowledgable people.
> >> I don't do much with rails, so I can only show you where to look. They
> >> will know first-hand (just don't forget to do
> >> your homework before you ask!)
>
> >> Good luck!
>
> --
> Ron Fox
> NSCL
> Michigan State University
> East Lansing, MI 48824-1321- Hide quoted text -
>
> - Show quoted text -

Thanks Ron for your help.

But what I want is different..

suppose you are running your ruby applicaiton in your local by this
url >>
http://localhost:3000/ right ?

I want to run this url like http://localhost/testproject

Without using Port. Is that any solution I can use my own url
without port to run the project ?

Thanks
Zangs Dev

Ron Fox

7/2/2008 11:37:00 AM

0

All browsers I'm aware of will treat
http://somehost/page

as http://somehost:80/page

and
https://somehost/page

as
https://somehost:443/page

It's the nature of URLs, and the nature of browsers.

That's one of many reasons why in rails deployment, one often
uses a proxy web server that forwards URL's on 80/443 to the
actual rails web servers.

e.g. in my applications I've set up
Apache with proxy-balancer. Apache takes the request, load balances
it out to one of my rails servers which are running on a range of
ports on a set of server systems.

This provides scalability and also the URL re-writing you're after,it
can be tricky to set up but a bit of googling should point you at some
recipes for doing it.

RF

Zangs Dev wrote:

> http://localhost:3000/ right ?
>
> I want to run this url like http://localhost/testproject
>
> Without using Port. Is that any solution I can use my own url
> without port to run the project ?
>
> Thanks
> Zangs Dev


--
Ron Fox
NSCL
Michigan State University
East Lansing, MI 48824-1321