Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Some applications (such as Plone) default to serving http on ports other than 80 (eg 8080).

Typically, to view those webapps you need to load http://mysite.tld:8080 instead of just http://mysite.tld (presuming you also have a 'standard' website running on port 80).

Is there a way to disguise and/or hide the port number from showing up in the address bar so that visitors don't know they're not on the standard http port? If so, how? Is a URL rewrite the proper approach?

share|improve this question
    
What is the application for this? –  mdpc Jan 17 '12 at 23:27
    
@mdpc - as mentioned above, if you want to run Apache and Plone (for example) on the same machine, one will be on port 80 while the other is on 8080. To a visitor, it would be nice to not show that they're hitting a different application via the visual cue of the port number in the URL bar. –  warren Jan 17 '12 at 23:28
    
Not an answer, but your statement: > Typically, to view those webapps you need to load mysite.tld:8080 instead of just mysite.tld (presuming you also have a 'standard' website running on port 80). Isn't correct. Regardless of whether or not you have a site running on port 80, if your site runs on port 8080 the client browser will not get there unless they specify the port (barring any redirection on the server side). –  joeqwerty Jan 18 '12 at 3:07
    
@joeqwerty - that is precisely my question :) –  warren Jan 23 '12 at 17:19
add comment

4 Answers 4

up vote 20 down vote accepted

One may set up a sort of portal using Apache with mod_proxy on :80 and make it to proxy requests for anything:anywhere.

share|improve this answer
add comment

Is there a way to disguise and/or hide the port number from showing up in the address bar so that visitors don't know they're not on the standard http port?

No, and there shouldn't be. Leaving a mechanism for sites to "hide" anything in the URL bar would be very bad on multiple fronts.

share|improve this answer
1  
Eh, you can change the file path portion of the URL from Javascript quite easily. You are correct about the server part however, especially ports above 1023. –  Chris S Jan 17 '12 at 23:31
add comment

A somewhat rudimentary solution I have seen used to hide URLs is to host an html page with your "pretty" URL that is a single frame frameset that contains your "ugly" URL.

share|improve this answer
    
yep, usually called URL cloacking –  ZJR Jan 18 '12 at 1:45
3  
more trouble than its worth, you no longer can copy paste and email the URL to someone else. –  Lie Ryan Jan 18 '12 at 2:10
add comment

Use separate virtualhosts in Apache, one for regular Apache serving and the other for proxying Plone. With Plone this is a quite normal approach, a lot of people run Apache with mod_cache or a reverse proxy like Varnish in front of Plone.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.