Subido por Jose Romero

Proxy-inverso-de-Apache-in-controlador-de-protocolo ingles

Anuncio
10/1/2020
Apache reverse proxy: no protocol handler - Super User
Podcast: We speak with Matt Cutts about leading the United States Digital Services and the role
software can play in government. Listen now.
Apache reverse proxy: no protocol handler
Asked 7 years, 6 months ago
Active 3 years, 6 months ago
Viewed 48k times
I am trying to configure a reverse proxy with apache, but I am getting a
valid for the URL error, which I do not understand.
21
No protocol handler was
This is the relevant configuration of apache:
ProxyRequests Off
ProxyPreserveHost On
8
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass
/gonvaled/examples/jsonrpc/output/services/
http://localhost:8000/services/
ProxyPassReverse /gonvaled/examples/jsonrpc/output/services/
http://localhost:8000/services/
The requests is reaching apache as:
POST /gonvaled/examples/jsonrpc/output/services/EchoService.py HTTP/1.1
And they should be forwarded to my internal service, located at:
0.0.0.0:8000/services/EchoService.py
These are the logs:
==> /var/log/apache2/error.log <==
[Wed Jun 20 02:05:20 2012] [debug] proxy_util.c(1506): [client 127.0.0.1] proxy: http:
found worker http://localhost:8000/services/ for
http://localhost:8000/services/EchoService.py, referer:
http://localhost/gonvaled/examples/jsonrpc/output/JSONRPCExample.safari.cache.html
[Wed Jun 20 02:05:20 2012] [debug] mod_proxy.c(998): Running scheme http handler
(attempt 0)
[Wed Jun 20 02:05:20 2012] [warn] proxy: No protocol handler was valid for the URL
/gonvaled/examples/jsonrpc/output/services/EchoService.py. If you are using a DSO
version of mod_proxy, make sure the proxy submodules are included in the configuration
using LoadModule.
[Wed Jun 20 02:05:20 2012] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib:
Compressed 614 to 373 : URL /gonvaled/examples/jsonrpc/output/services/EchoService.py,
referer:
http://localhost/gonvaled/examples/jsonrpc/output/JSONRPCExample.safari.cache.html
==>site,
/var/log/apache2/access.log
<== read and understand our Cookie Policy, Privacy Policy, and
By using our
you acknowledge that you have
127.0.0.1 - - [20/Jun/2012:02:05:20 +0200] "POST
our Terms of
Service.
/gonvaled/examples/jsonrpc/output/services/EchoService.py HTTP/1.1" 500 598
https://superuser.com/questions/439054/apache-reverse-proxy-no-protocol-handler
1/3
10/1/2020
Apache reverse proxy: no protocol handler - Super User
"http://localhost/gonvaled/examples/jsonrpc/output/JSONRPCExample.safari.cache.html"
"Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.19 (KHTML, like Gecko)
Chrome/18.0.1025.162 Safari/535.19"
apache-http-server
reverse-proxy
asked Jun 20 '12 at 0:14
dangonfast
1,838
4
21
33
3 Answers
I found the problem. The
proxy_html and proxy )
proxy_http
27
edited Feb 22 '16 at 18:42
For me, on apache
23
module needs to be activated too in Apache (I had only
httpd 2.4
answered Jun 20 '12 at 7:52
Eduardo Cuomo
dangonfast
115
1,838
4
4
21
33
, this happened because i was missing the trailing slash:
Did not work:
<Proxy balancer://mycluster>
BalancerMember http://192.168.111.7
BalancerMember http://192.168.111.80
</Proxy>
ProxyPass / balancer://mycluster
ProxyPassReverse / balancer://mycluster
Worked!
<Proxy balancer://mycluster>
BalancerMember http://192.168.111.7
BalancerMember http://192.168.111.80
</Proxy>
ProxyPass / balancer://mycluster/
ProxyPassReverse / balancer://mycluster/
(added
/
at the end)
edited Feb 22 '16 at 18:41
answered May 30 '14 at 20:10
Eduardo Cuomo
Nicholas DiPiazza
115
440
4
3
10
For me, apache 2.2.15, <kbd>/</kbd> at the end works. THX! – user580056 Apr 7 '16 at 7:18
helped me on Apache/2.4.10 (Debian). This needs to be documented! The error message is extremely
obtuse
DeveloperChris
Oct
11 have
'16 atread
2:39and understand our Cookie Policy, Privacy Policy, and
By using our site,
you– acknowledge
that
you
our Terms of Service.
https://superuser.com/questions/439054/apache-reverse-proxy-no-protocol-handler
2/3
10/1/2020
2
Apache reverse proxy: no protocol handler - Super User
For those that come looking for answers, another possibility is the URL service name to backend
too is missing. With LogLevel Debug, and mod_proxy and mod_proxy_fcgi, I was seeing the
following:
[debug] proxy: fgci: found worker fgci://127.0.0.1:9000/var/www/html/.../index.php
[debug] mod_proxy.c(1026): Running scheme fgci handler (attempt 0)
[debug] mod_proxy_fcgi.c(800): [client ...] AH01076: url:
fgci://127.0.0.1:9000/var/www/html/.../index.php proxyname: (null) proxyport: 0
[debug] mod_proxy_fcgi.c(805): [client ...] AH01077: declining URL
fgci://127.0.0.1:9000/var/www/html/.../index.php
[warn] proxy: No protocol handler was valid for the URL /.../index.php. If you are using a DSO
version of mod_proxy, make sure the proxy submodules are included in the configuration using
LoadModule.
Thankfully the code for mod_proxy_fastcgi (I'm using a backport for Apache 2.2 on RHEL6) is
available at https://github.com/ceph/mod-proxy-fcgi/blob/master/mod_proxy_fcgi.c#L805, which
is this piece of code:
if (strncasecmp(url, "fcgi:", 5) != 0) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01077) "declining URL %s",
url);
return DECLINED;
}
If you look closely at the logs -- I only noticed it when looking at the code that issues the
message -- you'll see that what should be fcgi://... is misspelt as fgci://...
So when you see
declining URL
it means either:
You don't have a handler loaded that accepts the service (eg. fcgi:), or
you have misspelt the service name.
answered Jun 21 '16 at 2:45
Cameron Kerr
968
1
4
8
I upvoted because of the "When you see this error it means..." portion of this answer. I feel that this should
lead most searchers in the right direction. – threeve Aug 8 '17 at 19:39
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and
our Terms of Service.
https://superuser.com/questions/439054/apache-reverse-proxy-no-protocol-handler
3/3
Descargar