18 votes
Accepted

"No protocol handler valid for the URL" with httpd mod_proxy_balancer

facepalm It turns out that I was missing a trailing slash on my ProxyPass directive: ProxyPass "/site/" "balancer://cms" should have been: ProxyPass "/site/" "balancer://cms/" (Note the trailing ...
Christopher Schultz's user avatar
17 votes
Accepted

What is the use of ProxyPassReverse Directive

If the server actually handling a request does a redirect to a different URL on that server, the ProxyPassReverse directive rewrites the URL in terms of the reverse proxy server. For example, as noted ...
Colt's user avatar
  • 1,999
13 votes
Accepted

Apache mod_proxy: forward secure websocket to non-secure

To get things to work, I also needed to load mod_proxy_wstunnel Once I did, this ruleset got things working: (in the VirtualHost of the domain that receives and proxies the websocket request) <...
BeetleJuice's user avatar
11 votes
Accepted

Apache proxy not working for a localhost port

Here is the solution for your problem: To turn on this boolean you simple have to use this line (root permissions) setsebool -P httpd_can_network_connect on or sudo setsebool -P ...
Mchoeti's user avatar
  • 226
10 votes

Apache2 Proxy timeout

I wanted to point out that although this answer works great for older versions, it breaks under recent versions of Apache 2.4 with error code AH00526. ProxyPass and ProxyPassMatch or <Proxy> and ...
Stewart Adam's user avatar
10 votes

How to Exclude an URL for Apache Mod_proxy?

In addition to Alastair McCormack answer: If you use <Location>, you need to put the exception below instead of before: <Location /my/> ProxyPass balancer://backend-cluster1 </...
frame's user avatar
  • 101
8 votes

How can I enable logging for requests going through mod proxy

You can also append proxy:trace5 to your existing LogLevel directive If you have this LogLevel error Change it to this LogLevel error proxy:trace5 Be sure to change that back to normal after use....
yunzen's user avatar
  • 335
8 votes

"No protocol handler valid for the URL" with httpd mod_proxy_balancer

In my case, I needed proxy_ajp module. a2enmod proxy proxy_http proxy_ajp
kujiy's user avatar
  • 466
7 votes

Apache2 Proxy timeout

I have Apache 2.4.6, but the patch to fix it is provided in Apache >= 2.4.8. The key here is to start your output immediately so that Apache (mod_proxy_fcgi) thinks the connection is active. For ...
Chris's user avatar
  • 71
7 votes
Accepted

Apache 2.4.7 mod_proxy_wstunnel tunneling too much (HTTP as well as WS)

anders' answer got me 95% of the way there. The basic scenario: We have a server on newapp.example.com Port 8080 is running both HTTP and WebSockets The URL that responds to WebSockets requests is /...
Brian Beckett's user avatar
6 votes
Accepted

SSL mod_proxy issues in <location> bracket

From what I can tell ProxyPass isn't meant to be used inside of a block - you have it in a <Location> block. It needs to be out of that block, and you need to turn SSLProxyEngine on as well: ...
cutrightjm's user avatar
6 votes

What is the use of ProxyPassReverse Directive

From the Apache 2.4 Reverse proxy guide: To ensure that and Location: headers generated from the backend are modified to point to the reverse proxy, instead of back to itself, the ProxyPassReverse ...
karatedog's user avatar
  • 286
5 votes
Accepted

Apache mod_proxy with Tomcat 8.5 using http2

Apache httpd added HTTP/2 proxy support from 2.4.21 but suggest you run latest (2.4.27 at time of writing) as this module is still changing quite a bit at the moment. Tomcat has just added HTTP/2 ...
Barry Pollard's user avatar
5 votes

Apache: honouring the DNS ttl in proxy-pass

The only option that can be helpful for your use case is disablereuse=On. The DNS queries are performed by resolver part of glibc. The results are not cached by this library, or by OS. In apache case ...
Mircea Vutcovici's user avatar
5 votes

No protocol handler was valid for the URL / (scheme 'ws')

I was getting that error as well. It happened when I proxying HTTPS requests to WS protocol. The error went away when I split the proxy to forward HTTPS requests to HTTP and WSS requests to WS. To ...
Stephen Ostermiller's user avatar
4 votes

Apache Reverse Proxy Java Application Server CLOSE_WAIT Connections

This is a known issue with mod_proxy, since 2011. The ttl needs to be shorter than the application's keepalive, so that apache is always first to send a FIN. Another difficulty is it's not defined ...
OrangeDog's user avatar
  • 544
4 votes

Apache ProxyPass: pass requested URL as GET parameter to destination URL

You should be using the ProxyPassMatch directive, if you want to use a regex, BUT as noted in the ProxyPass directive documentation url is a partial URL for the remote server and cannot include a ...
Colt's user avatar
  • 1,999
4 votes
Accepted

Apache decoding semicolon - mod_proxy

mod_proxy canonicalise URLs passed to the backend. If you want suppress this behavior use nocanon keyword and this passes the URL path "raw" to the backend. Eg: ProxyPass / http://127.0.0.1:8081/ ...
Federico Sierra's user avatar
4 votes
Accepted

Apache doesn't listen on all ports configured with virtual host and reverse proxy

Somewhere in your Apache configuration, you must have matching Listen directives for each port you want to listen to: Listen 3000 Listen 3010 It appears that you already have one, but not the ...
Michael Hampton's user avatar
3 votes

How to Configure Apache mod_proxy to proxy Glassfish 4.1 on Fedora 21?

You've likely run into an issue with SELinux. By default the web server can only make outbound connections to a limited range of ports: # semanage port -l | grep http http_cache_port_t ...
Michael Hampton's user avatar
3 votes

Using ProxyPassMatch for FastCGI, results in connection refused on port 9000

Per Chris's comment, I just wanted to add if apache/php does support socket connections (looks like if apache > 2.4.10, it can support it), you can also change to use that in your apache config. I ...
armyofda12mnkeys's user avatar
3 votes
Accepted

Reverse proxy Apache rewrite rule doesn't work

Because you regex doesn't match. ^[A-Za-z0-9]$ matches URIs composed of one alphanumeric character and you didn't put any leading slash nor capture group. You need ProxyPassMatch ^/([A-Za-z0-9]+)$ ...
Xavier Lucas's user avatar
3 votes

Understanding apache 2.4 mod_proxy_fcgi and RewriteRules in htaccess

With ProxyPassMatch, .htaccess files are ignored. Try using FilesMatch and SetHandler instead, as described here and here.
Peter Nowee's user avatar
3 votes

disable mod_proxy for subdirectory (apache)

It wouldn't have been available at the time you asked this question, but if you're using Apache HTTPD 2.4 or later, then as described in the docs you could do it with two location blocks: <...
Gagravarr's user avatar
  • 747
3 votes
Accepted

Apache mod_proxy AH00927 messages

Should I be worried? No What do these messages mean Exactly what they say and why are they in the error log if they're marked as [proxy:debug]? The proxy:debug is a LogLevel and the LogLevel ...
user9517's user avatar
  • 115k
3 votes
Accepted

Securing traffic handled with mod_proxy

I can't imagine the request would be exposed between Apache and Node, would it? Well, yes it is but the surface is small and no worse really than apache passing it off to another daemon (e.g. php-fpm)...
user9517's user avatar
  • 115k
3 votes

"No protocol handler valid for the URL" with httpd mod_proxy_balancer

Same as kujiy i had to add the mod_ajp. I am using apache4. My log showed messages as follows: No protocol handler was valid for the URL /jira. If you are using a DSO version of mod_proxy, make ...
Yogesh Devi's user avatar
3 votes

ws protocol and apache mod_proxy_wstunnel configuration: error 500

Looks like you are missing mod_proxy_wstunnel module which is required for Websockets support. It should be enabled like below in your httpd.conf LoadModule proxy_wstunnel_module modules/...
serverliving.com's user avatar
3 votes

Apache mod_proxy: redirection based on http header?

Yes, it is possible. Make a rewrite rule based on a conditional check of the REFERER header. RewriteCond documentation %{HTTP:header}, where header can be any HTTP MIME-header name, can always be ...
Dti's user avatar
  • 66
3 votes

Apache 2.4 sends 502 errors when backend sends 401 on large file uploads

The fix was to modify Tomcat config for 'maxSwallowSize' which has Tomcat swallow bytes before the response is sent. https://tomcat.apache.org/tomcat-8.0-doc/config/http.html maxSwallowSize The ...
bunkowm's user avatar
  • 33

Only top scored, non community-wiki answers of a minimum length are eligible