Remove or hide the port number 3000 from the URL

420 views
Skip to first unread message

Periyasamy Ramachandiran

unread,
Aug 23, 2011, 8:28:14 AM8/23/11
to rubyonra...@googlegroups.com
Hi Friends,

I have created a ruby on rails application and its running with
mongrel/phusion passenger . I need to remove/hide the port number 3000
from the URL http://localhost:3000.

Please help me how to proceed for this?

Regards,
Periyasamy

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

Tim Shaffer

unread,
Aug 23, 2011, 8:35:57 AM8/23/11
to rubyonra...@googlegroups.com
Well the only way your browser will hide the port number is if you're using the default port number for the protocol.

For HTTP, this means port 80.

You'll need to run your rails application on port 80, or have it proxied behind another web server (such as Apache) that is running on port 80.

Periyasamy Ramachandiran

unread,
Aug 23, 2011, 9:03:45 AM8/23/11
to rubyonra...@googlegroups.com
Tim Shaffer wrote in post #1018030:

Hi Shaffer,

Thanks for your reply. Yes I am running my application with Phusion
passenger using apache. The apache is running on the port 80. I am able
see the apache test page for the URL http://localhost.

If I start the phusion passenger, by default it takes 3000 port. I am
unable to use the port 80 since its already running for apache.

could you help how can I run my application with the port 80 using
phusion passenger with apache?

Tim Shaffer

unread,
Aug 23, 2011, 9:16:29 AM8/23/11
to rubyonra...@googlegroups.com
Easiest way is to use the passenger apache module.

Once you have installed the passenger gem (sounds like you have), you can use the "passenger-install-apache2-module" command to install the apache module.

Check out the documentation here: http://www.modrails.com/install.html

Bernd Ritter

unread,
Aug 23, 2011, 8:45:38 AM8/23/11
to rubyonra...@googlegroups.com
Hi,

best solution would be proxy or apache's virtual host.

Cheers,
Bernd
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/1WcCsDBj5dUJ.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--

Alpha Blue

unread,
Aug 23, 2011, 11:14:16 PM8/23/11
to rubyonra...@googlegroups.com
<VirtualHost computer-name>
ServerName computer-name
DocumentRoot "C:/your/path/to/app/"
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
ProxyPreserveHost On
</VirtualHost>
Reply all
Reply to author
Forward
0 new messages