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.

I would like to configure Apache to proxy mldonkey running at localhost. Initially I have used the following configuration (in server config):

<IfModule mod_proxy.c>
    <LocationMatch /(mldonkey|bittorrent)/>
        ProxyPass           http://localhost:4080/
        ProxyPassReverse    http://localhost:4080/
    </LocationMatch>
</IfModule>

and it didn't worked! error.log reads [error] [client 192.168.1.1] File does not exist: /var/www/mldonkey which means that Apache does not intersect the URL. The URL I test is: http://myserver/mldonkey/. I also tried http://myserver/mldonkey (I won't expect it to work, but OK if it would work as well).

However, when I change the regexp to following:

<LocationMatch /mldonkey/>

it started to work (i.e. mod_proxy functions OK, more over all ). I have tried the following alternatives:

<LocationMatch ^/(mldonkey|bittorrent)/>
<LocationMatch ^/(mldonkey|bittorrent)/.*>
<LocationMatch ^/(mldonkey|bittorrent)>
<LocationMatch /(mldonkey|bittorrent)>
<LocationMatch "^/(mldonkey|bittorrent)/">
<LocationMatch "/(mldonkey|bittorrent)">
<LocationMatch "/(mldonkey)">
<LocationMatch "/(mldonkey)/">

with no positive result. I am stuck. Please give me a hint where to look at.

P.S. Apache Server 2.2.19.

P.P.S. Would be happy if <LocationMatch> would work, without using the heavy artillery of mod_rewrite.

share|improve this question
    
Can you provide a URL that you would want to match ? –  Iain Apr 8 '12 at 17:10
    
Where did you put that configuration? –  Shane Madden Apr 8 '12 at 18:03
    
Thanks for relative questions (I've updated the question): (1) the setting is in server conf (not in .htaccess) (2) I test using http://myserver/mldonkey/ (where myserver is the local domain of Apache Server, MLDonkey is running at the same host). –  dma_k Apr 8 '12 at 18:56

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.