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 !
Great stuff! Thanks for posting this – you really helped me out.
Colin MacLeod
Thank you! I was stuck on this for over 1 hour!
Yi
you saved my day. *gg* thx
Klaus Eckenfellner
Thank you very much!
Carl
Another thanks!
Ian
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.
Wes
you saved my day. *gg* thx
Venelin
Yeah, thanks a lot. Saved me hours.
Timo
Thanks my friend, this solved my problem too :)
Honza Svasek
You are the best. Oh man did you save me some time!
Mike
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.
Iber Alvarez
Thanks a lot !!!!!
Raphaël Bickel
Thanks! I was stuck with the same error too. Solved by `a2enmod proxy_http`.
yc
Yuen-Chi Lian
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?
alan
Many thanks, man.
Frode Nilsen
Thanks for posting this. Was banging my (and other people’s) head against the wall for an hour over this! :)
Bob
Great tip, fixed my problem in 30 seconds. Thank You!
Ray
Thanks man. A very useful page. You fixed my problem !
Nico
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. :)
Charles N Wyble
Thanks, solved my issue!
Pedro Monteiro
No se si entenderas español, pero me sirvio mucho lo que pusiste. Gracias
Slds
George
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
Stephen
yea! it works you rock!
roger
Thank you very much! The same problem spent me 4 hours.
Bao
Thanks! In hindsight it’s sort of obvious, much like the dent in this desk from my forehead…
Don
Thanks Yuen-Chi Lian for:
a2enmod proxy_http
Zeal
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.
Dave
Thank you. You saved me. I also wonder why the guys from apache don’t enable http_proxy by default.
Pavel
Thanks from me, too.
Pistos
Thank you !! ;-)
Simon
Thanks. I just had to run “sudo a2enmod proxy_http” and restart apache. Problem solved.
Alex
Great stuff!
Made my day!
All the best,
Lars Rohdin
Lars Rohdin
You’ve saved my life, God bless you!
minhnghivn
Very clear, very useful, worked as a charm
Thank you
Deathson
EXCELENT!!! It worked!
Andre
Thanks man, great.
Allen
Thank you very much!!!!!!!!!!!1
Gustavo
Thanks for this very good information
fabrice
One more person you helped here!
Thank you!
Alex
Thank you again bud
Andrew
I’ll “sign the guest page” as another user who benefited from this solution – thanks!
Dennis
Yet another testimonial your hunch has been helpful.
Thank you.
Patrick Refondini
It seems I’m not the only one you helped with this article (-:
Nice work, have a lot of fun!
mhernandez
Just what I needed–this post is still helping people almost 3 years later :)
Annon
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! :)
Il Davo
Thank you too. :)
Alexander Temerev
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.
Giggesh
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).
Giggesh
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!
Scott
Thanks a lot, it helped me with some Ruby on lb site :)
Olgierd
Thanks !
Seb
It works, thank you !
Mr Xhark
Many thanks for this post! The modul proxy_http was for me the solution :D.
Anonymous
Thanks, probably saved an hour or two.
iSlack
Worked for me! Thank you Man!
Pawel
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!
Ramandeep
Thanks!
Callum
Thanks man! You saved my day! Anyway, I recomend this cleaner command:
a2enmod proxy_http
An then, apache2 restart.
kurakensama
Tnx a lot man
Pedro
You just saved me a lot of time. Thanks.
Gordon
Dude thanks a lot man… I have been lurking around for a while now to find the solution….You saved my day… :)
Vinod
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
Bruce
Thanks Bruce, I spent two hours trying a2enmod,ln -s, rails servers and all I needed was a slash.
Andrew
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
Igor Galić
Thanx – short and clear!
andy
Thank you! All my reverse proxy setup was missing was proxy_http.load, just as you write here.
Evan R. Murphy
Thanks, this was exactly what I was looking for!
Mark
Thanks! You saved my day!
DaGu
thank you very much. you realy helped me
achi
Thanks! That was it!
Wojtek