proxy: No protocol handler was valid for the URL
I am using mod_proxy to hide my host-wide Geneweb setup behind a bunch of Apache vhosts. I was surprised to find that after migrating to Apache 2.2 my mod_proxy setup had ceased working. The vhost’s access.log was showing a 403 and the error.log was churning messages containing “proxy: No protocol handler was valid for the URL”. I fed that message to Google and after looking at a few random threads I began to understand that the mod_proxy configuration had most probably changed between Apache 2.0 and Apache 2.2.
In addition to mod_proxy.so additional modules now have to be loaded in order to support a few configuration directives. The mod_proxy configuration for my Geneweb setup is as follow :
RewriteEngine On
ProxyPass /robots.txt http://www.bensaude.org/robots.txt
ProxyPass / http://kivu.grabeuh.com:2317/
ProxyPassReverse / http://kivu.grabeuh.com:2317/
A quick look at the available modules in /etc/apache2/mods-available showed me that in addition to mod_proxy.so I also had mod_proxy_ajp.so, mod_proxy_balancer.so, mod_proxy_connect.so, mod_proxy_ftp.so, mod_proxy_html.so and mod_proxy_http.so. On a hunch I decided that mod_proxy_http.so was the best candidate so I tried that first.
ln -s /etc/apache2/mods-available/proxy_http.load \
/etc/apache2/mods-enabled/proxy_http.load
apache2ctl configtest
apache2ctl graceful
Lo and behold – it now works…
Merry whatever to all of you !
82 responses to “proxy: No protocol handler was valid for the URL”
Leave a Reply
You must be logged in to post a comment.
Great stuff! Thanks for posting this – you really helped me out.
Thank you! I was stuck on this for over 1 hour!
you saved my day. *gg* thx
Thank you very much!
Another thanks!
Excellent, I too upgraded from 2.0.5 to 2.2.3 using apt-pinning on Ubuntu 6.0.6 LTS to find the reverse proxy was broken.
Thanks for sharing, solved my problem immediately.
you saved my day. *gg* thx
Yeah, thanks a lot. Saved me hours.
Thanks my friend, this solved my problem too :)
You are the best. Oh man did you save me some time!
Thanks,
I was forgot enable the proxy_http module, but in my config file i do not have the ProxyPassReverse, well, it works fine for me.
Really i do not know how ProxyPassReverse works in this case, but actually, i think that my configuration not need it.
Thanks a lot !!!!!
Thanks! I was stuck with the same error too. Solved by `a2enmod proxy_http`.
yc
Not fair. Doesn’t work for me. Apache claims proxy_http is already enabled (indeed the symlink exists) but theres no sign of it in apache2ctl -t -D DUMP_MODULES. Should there be I wonder?
Many thanks, man.
Thanks for posting this. Was banging my (and other people’s) head against the wall for an hour over this! :)
Great tip, fixed my problem in 30 seconds. Thank You!
Thanks man. A very useful page. You fixed my problem !
Sweet! Worked like a charm. What kind of morons don’t enable http proxying by default on a WEB SERVER? I mean really. Thanks for the tip. Worked like a charm. :)
Thanks, solved my issue!
No se si entenderas español, pero me sirvio mucho lo que pusiste. Gracias
Slds
This works!,
What a hero
It works
I was going to have to rip my hair our,
so you saved me a ton of money on a toupee
yea! it works you rock!
Thank you very much! The same problem spent me 4 hours.
Thanks! In hindsight it’s sort of obvious, much like the dent in this desk from my forehead…
Thanks Yuen-Chi Lian for:
a2enmod proxy_http
[…] e) nun tritt das hier beschriebene Problem auf “Server Error 500″ http://serendipity.ruwenzori.net/index.php/2006/12/24/proxy-no-protocol-handler-was-valid-for-the-ur… […]
I was suffering from the “No protocol handler” issue, but only when I tried connecting to secure sites. The following command enabled the module that I needed:
a2enmod proxy_connect
Hopefully this will save a few more people from anguish.
Thank you. You saved me. I also wonder why the guys from apache don’t enable http_proxy by default.
Thanks from me, too.
Thank you !! ;-)
Thanks. I just had to run “sudo a2enmod proxy_http” and restart apache. Problem solved.
Great stuff!
Made my day!
All the best,
Lars Rohdin
You’ve saved my life, God bless you!
Very clear, very useful, worked as a charm
Thank you
EXCELENT!!! It worked!
Thanks man, great.
Thank you very much!!!!!!!!!!!1
Thanks for this very good information
One more person you helped here!
Thank you!
Thank you again bud
I’ll “sign the guest page” as another user who benefited from this solution – thanks!
Yet another testimonial your hunch has been helpful.
Thank you.
It seems I’m not the only one you helped with this article (-:
Nice work, have a lot of fun!
Just what I needed–this post is still helping people almost 3 years later :)
I had the same problem. I did one google search. You were the first on list and you gave me the solution.
What to say if not Thanks a Lot! :)
Thank you too. :)
Dave wrote :
“”””””””””””””””””””””””””””””””””””””””””””””””””
Dave says:
January 7, 2009 at 2:59
I was suffering from the “No protocol handler” issue, but only when I tried connecting to secure sites. The following command enabled the module that I needed:
a2enmod proxy_connect
Hopefully this will save a few more people from anguish.
“”””””””””””””””””””””””””””””””””””””””””””””””
Thanks Dave, for your help…
I have enabled “proxy_connect” But, i am still stuck here…
[warn] proxy: No protocol handler was valid for the URL /httpbinding. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
I am not sure what other modules should I enable here.
Hi All,
The above said problem is solved…
The issue is that I was trying to proxy over HTTPS but mod_ssl is not enabled. So I had to install/configure mod_ssl for my Apache server and enable that in httpd.conf.
I achieved that as follows:
1. By including ‘SSLProxyEngine on’
#Listen 12.34.56.78:80
Listen 80
SSLProxyEngine on
#
2.uncomment/include
LoadModule ssl_module modules/mod_ssl.so
That had completed my proxy-setup for Apache to a server which run on secured HTTP (HTTPS).
I’m a newbie to Apache… needed to have Apache and IIS on same box, sharing same IP. I was using the BitNami Trac stack for my deployment solution. A colleague led me to the mod-proxy configuration… This last bit from you got me over the hump (i.e. was getting Internal Server Error when browsing to the IIS sites wired in the httpd.conf file) After uncommenting the proxy-http.load statement in my http.conf file it’s working as advertised. Very satisfying! Thanks!
Thanks a lot, it helped me with some Ruby on lb site :)
Thanks !
It works, thank you !
[…] trouvé la solution chez Serendipiti qui explique que l’erreur provient d’un lien symbolique manquant. Pour corriger cette […]
Many thanks for this post! The modul proxy_http was for me the solution :D.
Thanks, probably saved an hour or two.
Worked for me! Thank you Man!
ahh saved my day! Nice tip, I was stuck with this problem and googled in to your blog.
Thanks. Though now I just wonder why it works without proxy_http on centos and not on ubuntu!
Thanks!
Thanks man! You saved my day! Anyway, I recomend this cleaner command:
a2enmod proxy_http
An then, apache2 restart.
Tnx a lot man
You just saved me a lot of time. Thanks.
Dude thanks a lot man… I have been lurking around for a while now to find the solution….You saved my day… :)
Note this error can also be caused by a misconfigured ProxyPass directive where the source path includes a trailing slash and remote-server path does not. For example,
ProxyPass / http://localhost:3001 – *** Wrong ***
ProxyPass / http://localhost:3001/ – Correct
Thanks Bruce, I spent two hours trying a2enmod,ln -s, rails servers and all I needed was a slash.
This configuration doesn’t need RewriteEngine on. It doesn’t use mod_rewrite, it doesn’t need mod_rewrite, so it shouldn’t enable it.
For a complete overview of mod_proxy and how to configure it for reverse proxying, please refer to: http://www.apachetutor.org/admin/reverseproxies
Thanx – short and clear!
Thank you! All my reverse proxy setup was missing was proxy_http.load, just as you write here.
Thanks, this was exactly what I was looking for!
Thanks! You saved my day!
thank you very much. you realy helped me
[…] If you get errors about the proxy module (see the apache2 error log), then you may want to look at this blog post. […]
Thanks! That was it!
Cool ! I didn’t used Proxy pass but rather RewriteRule, and I had the same message.
RewriteEngine On
ProxyRequests Off
RewriteRule ^/meteo-cluster/?(.*) http://localhost:8080/meteo-cluster/$1 [P]
Now it works, and even better, I understand what I do !
Thank you!
Great!
Thank you! Great!
Cool!
You saved my day! Thank you!!!
[…] e) nun tritt das hier beschriebene Problem auf “Server Error 500″ http://serendipity.ruwenzori.net/index.php/2006/12/24/proxy-no-protocol-handler-was-valid-for-the-ur… […]
Also solved my proxy issues, thank you. I had assumed enabling mod_proxy would take care of all dependencies… not true.
I also found moving from Apache 2.2 to 2.4 that ‘/’ has to be at the end of the proxy URL, both in the browser and in the proxy configuration.
[…] proxy: No protocol handler was valid for the URL […]