logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to remove port number from URL?
Author
Firstborn



Joined: 22 Oct 2007
Posts: 2

PostPosted: Mon 22 Oct '07 16:49    Post subject: How to remove port number from URL? Reply with quote

Hello everyone, I'm kind of a newbie, so I'm stuck at this (at least seemingly) trivial thing... I've got a windows box running Apache 2.0.59, which works just fine and is accessible via a URL like http://www.domain.net/. On the same box there is another web server running, which is, in turn, accessible via http://www.domain.net:8888/. Plain ugly.

All I want is to make that other server accessible via some good and clean looking URL, e.g. http://www.domain.net/herewego/.

I know it is possible, I know it involves virtual hosts, mod_proxy and mod_proxy_html, but it seems impossible for me to put everything together. I managed to google some 2 or 3 recipes of how to achieve this, but none of those actually worked for me. No idea why.

So, I'd apprecaite if someone could throw in here a httpd.conf snippet that would do the trick.

Thank you in advance!
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Mon 22 Oct '07 18:46    Post subject: Reply with quote

Be sure to uncomment in your httpd.conf:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Add at the bottom of your httpd.conf:

ProxyRequests Off
ProxyPass /herewego http://www.domain.net:8888/herewego
ProxyPassReverse /herewego http://www.domain.net:8888/herewego

Steffen
Back to top
Firstborn



Joined: 22 Oct 2007
Posts: 2

PostPosted: Tue 23 Oct '07 9:28    Post subject: Reply with quote

Thanks, Steffen, but this was in fact the first thing that I've tried and it didn't work. After implementing all the changes you mentioned with a slight correction (http://www.domain.net/herewego should point to http://www.domain.net:8888, not http://www.domain.net:8888/herewego) and pointing a browser to http://www.domain.net/herewego I'm getting a the login page from the service running on port 8888, but no stylesheets, no images, no nothing. Trying to login produces a 404 error, so it seems that links are broken internally at some point.

Any further advice?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3058
Location: Hilversum, NL, EU

PostPosted: Tue 23 Oct '07 19:03    Post subject: Reply with quote

Have a look at http://apache.webthing.com/mod_proxy_html/

A windows binary is at the download page.

Steffen
Back to top


Reply to topic   Topic: How to remove port number from URL? View previous topic :: View next topic
Post new topic   Forum Index -> Apache