4

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?

4
  • What is the application for this?
    – mdpc
    Jan 17, 2012 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, 2012 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, 2012 at 3:07
  • @joeqwerty - that is precisely my question :)
    – warren
    Jan 23, 2012 at 17:19

4 Answers 4

21

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

20

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.

1
  • 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, 2012 at 23:31
3

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.

2
  • yep, usually called URL cloacking
    – ZJR
    Jan 18, 2012 at 1:45
  • 4
    more trouble than its worth, you no longer can copy paste and email the URL to someone else.
    – Lie Ryan
    Jan 18, 2012 at 2:10
2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .