Unwanted port number in the address bar

    Date: 03/14/06 (Apache)    Keywords: browser, web, apache

    I'm not sure where I should search for the answer on my question, so I decided to ask you guys :-) Thanks in advance for everyone who can help.

    There is a FreeBSD server where an apache is installed. One httpd process is listening to port 80 and works as a proxy for the other httpds which work on a number of virtual hosts. These httpds also listen to some port which shouldn't be shown to the web-sites' visitors.

    In the text of the proxy httpd's httpd.conf we have such a code:


    ServerName megaserver.su
    DocumentRoot /home/megaserversu/www
    ProxyPass / http://www.megahoster.su:32001/
    ProxyPassReverse / http://www.megahoster.ru:32001/
    #CacheRoot "/usr/local/apache/proxy/"


    Then a visitor asks for megaserver.su, the proxy httpd send a request to the corresponding httpd of that site and returns the data as if it have taken if from its own folders. The problem appears when one requests a folder like megaserver.su/superfolder/ - if there is a trailing slash then everything is fine, but if there isn't... it's fine too, except of the address represented by browser that transforms to http://megaserver.su:32001/superfolder/

    Just in case:

    There are such lines in the configs of the proxy and personal httpds:

    LoadModule dir_module libexec/apache2/mod_dir.so
    LoadModule rewrite_module libexec/apache2/mod_rewrite.so

    I understand that I should set somehow that the requests for folders without trailing slash should be treated as the one with it, but which module really does it? I've read the docs on these two modules but couldn't determine how to make it do what I want. Maybe it's better just to rewrite the address string on the proxy httpd using mod_rewrite, is it possible? Which way is better?

    Source: http://community.livejournal.com/apache/30972.html

« Wrangling OpenSSL on XP... || Apache connection woes »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home