How can I run url without using port ?

Z

Zangs Dev

Hello,

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

and my server name is like 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/

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/

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/second_app


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

Thanks in Advance

Regards
Zangs Dev
 
J

Jano Svitok

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.
 
J

Jano Svitok

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/first_app
OR
http://www.mydomain.com/
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#deployment
http://wiki.rubyonrails.com/rails/pages/HowToInstallApplicationsInSubdirectories

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!
 
Z

Zangs Dev

Thanks so much again...

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

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

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!
 
Z

Zangs Dev

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





Zangs said:
Thanks so much again...
Now I will try in google and rails forum....
[1] google.com
http://wiki.rubyonrails.com/rails/pages/Howtos#deployment
http://wiki.rubyonrails.com/rails/pages/HowToInstallApplicationsInSub...
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
 
R

Ron Fox

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,665
Latest member
salkete

Latest Threads

Top