Pou Belle
2006-Dec-29 22:22 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
Hi everybody, I just suscribe to the list because I have a problem using mongrel and mongrel_cluster... I setup a server (debian unstable wich provide apache 2.2.3 as a pakage) but I have an error when I try to access my application : ERROR 403 : Forbidden, You don''t have permission to access / on this server. When I check apache''s logs I found that : [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule. I googled this error and I found that I have to load 3 differents modules, so I typed : a2enmod proxy a2enmod proxy_http a2enmod proxy_balancer each time I get this return : This module is already enabled! So I have no idea to what can i do ... This is my config : ----------------------- cat /etc/apache2/mods-enabled/proxy.conf <IfModule mod_proxy.c> #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email. ProxyRequests Off <Proxy *> AddDefaultCharset off Order deny,allow Allow from all #Allow from .example.com </Proxy> # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off | On | Full | Block ProxyVia On </IfModule> ----------------------- cat /etc/apache2/sites-enabled/demo.mysite.com <VirtualHost *:80> ServerName demo.mysite.com DocumentRoot /var/rails/demo.mysite.com/current/public <Directory "/var/rails/demo.mysite.com/current/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Proxy balancer://mongrel_cluster> BalancerMember <http://127.0.0.1:8000/> BalancerMember <http://127.0.0.1:8001/> BalancerMember <http://127.0.0.1:8002/> </Proxy> RewriteEngine On # Make sure people go to demo.mysite.com, not myapp.com #RewriteCond %{HTTP_HOST} ^myapp.com$ [NC] #RewriteRule ^(.*)$ http://www.myapp.com$1 [R=301,L] # Yes, I''ve read no-www.com, but my site already has much Google-Fu on # www.blah.com. Feel free to comment this out. # Uncomment for rewrite debugging #RewriteLog logs/myapp_rewrite_log #RewriteLogLevel 9 # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Rewrite index to check for static RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA] # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] # Deflate AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # Uncomment for deflate debugging #DeflateFilterNote Input input_info #DeflateFilterNote Output output_info #DeflateFilterNote Ratio ratio_info #LogFormat ''"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)'' deflate #CustomLog logs/myapp_deflate_log deflate ErrorLog /var/log/apache2/demo.mysite.com_errors_log CustomLog /var/log/apache2/demo.mysite.com_log combined </VirtualHost> (Configuration comes principaly from http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ ) I need some help, thanks. (Hope you understand my english... I''m french) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061229/564e6742/attachment.html
Zed A. Shaw
2006-Dec-29 23:14 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
On Fri, 29 Dec 2006 23:22:51 +0100 "Pou Belle" <woufdraft at gmail.com> wrote:> Hi everybody, > > I just suscribe to the list because I have a problem using mongrel and > mongrel_cluster... I setup a server (debian unstable wich provide apache > 2.2.3 as a pakage) but I have an error when I try to access my application : > ERROR 403 : Forbidden, You don''t have permission to access / on this > server. >Your configuration seems rather complex. And it looks like you might have multiple versions of apache on that machine. I''d take a step back, start with a fresh config on a pristine machine, and do the simplest configuration you can. Then slowly build it up to what you need. If that all works then you''ll have a stable base to compare with. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
Kevin Williams
2006-Dec-29 23:51 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
I have no idea what else you might be using Apache for (svn, etc.) or how open you are to new ideas, but I use the http://nginx.net server to front my mongrel servers, and I''m extremely pleased. You might want to check it out. On 12/29/06, Zed A. Shaw <zedshaw at zedshaw.com> wrote:> On Fri, 29 Dec 2006 23:22:51 +0100 > "Pou Belle" <woufdraft at gmail.com> wrote: > > > Hi everybody, > > > > I just suscribe to the list because I have a problem using mongrel and > > mongrel_cluster... I setup a server (debian unstable wich provide apache > > 2.2.3 as a pakage) but I have an error when I try to access my application : > > ERROR 403 : Forbidden, You don''t have permission to access / on this > > server. > > > > Your configuration seems rather complex. And it looks like you might have multiple versions of apache on that machine. > > I''d take a step back, start with a fresh config on a pristine machine, and do the simplest configuration you can. Then slowly build it up to what you need. If that all works then you''ll have a stable base to compare with. > > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Cheers, Kevin Williams http://www.almostserio.us/ "Any sufficiently advanced technology is indistinguishable from Magic." - Arthur C. Clarke
Eden Li
2006-Dec-30 01:12 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
Apologies if this has been mentioned before, but is there an updated comparison of all the different mongrel implementation methods out there? I''ve been on lighty+pen+mongrel for awhile and I don''t really see a compelling to switch to nginx... unless someone else has experience with both and can elaborate on the goodness of nginx vs lighty/pen... On 12/29/06, Kevin Williams <kevwil at gmail.com> wrote:> I have no idea what else you might be using Apache for (svn, etc.) or > how open you are to new ideas, but I use the http://nginx.net server > to front my mongrel servers, and I''m extremely pleased. You might want > to check it out. > > On 12/29/06, Zed A. Shaw <zedshaw at zedshaw.com> wrote: > > On Fri, 29 Dec 2006 23:22:51 +0100 > > "Pou Belle" <woufdraft at gmail.com> wrote: > > > > > Hi everybody, > > > > > > I just suscribe to the list because I have a problem using mongrel and > > > mongrel_cluster... I setup a server (debian unstable wich provide apache > > > 2.2.3 as a pakage) but I have an error when I try to access my application : > > > ERROR 403 : Forbidden, You don''t have permission to access / on this > > > server. > > > > > > > Your configuration seems rather complex. And it looks like you might have multiple versions of apache on that machine. > > > > I''d take a step back, start with a fresh config on a pristine machine, and do the simplest configuration you can. Then slowly build it up to what you need. If that all works then you''ll have a stable base to compare with. > > > > > > -- > > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > > http://www.zedshaw.com/ > > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > > http://mongrel.rubyforge.org/ > > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > > _______________________________________________ > > Mongrel-users mailing list > > Mongrel-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/mongrel-users > > > > > -- > Cheers, > > Kevin Williams > http://www.almostserio.us/ > > "Any sufficiently advanced technology is indistinguishable from > Magic." - Arthur C. Clarke > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Zed A. Shaw
2006-Dec-30 01:47 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
On Fri, 29 Dec 2006 17:12:13 -0800 "Eden Li" <eden.li at gmail.com> wrote:> Apologies if this has been mentioned before, but is there an updated > comparison of all the different mongrel implementation methods out > there? > > I''ve been on lighty+pen+mongrel for awhile and I don''t really see a > compelling to switch to nginx... unless someone else has experience > with both and can elaborate on the goodness of nginx vs lighty/pen...Well, nginx would be one component less than your current combo, and has a equally simple configuration. Unless you have a lighty specific component the lowered complexity would be a main motive. nginx also supports fcgi. Otherwise, if it ain''t broke, don''t fix it. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://www.awprofessional.com/title/0321483502 -- The Mongrel Book http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
Vishnu Gopal
2006-Dec-30 04:18 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
Nginx cannot correctly set X-Forwarder-For headers right? Which means all your requests seem to end up coming from localhost. Is this still true or has something changed? Vish On 12/30/06, Zed A. Shaw <zedshaw at zedshaw.com> wrote:> On Fri, 29 Dec 2006 17:12:13 -0800 > "Eden Li" <eden.li at gmail.com> wrote: > > > Apologies if this has been mentioned before, but is there an updated > > comparison of all the different mongrel implementation methods out > > there? > > > > I''ve been on lighty+pen+mongrel for awhile and I don''t really see a > > compelling to switch to nginx... unless someone else has experience > > with both and can elaborate on the goodness of nginx vs lighty/pen... > > Well, nginx would be one component less than your current combo, and has a equally simple configuration. Unless you have a lighty specific component the lowered complexity would be a main motive. nginx also supports fcgi. > > Otherwise, if it ain''t broke, don''t fix it. > > -- > Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu > http://www.zedshaw.com/ > http://www.awprofessional.com/title/0321483502 -- The Mongrel Book > http://mongrel.rubyforge.org/ > http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Ezra Zygmuntowicz
2006-Dec-30 04:40 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
Nginx has never had a problem setting X-Forwarded-For ever since I have been using it. Just use these settings as part of the config: # needed for HTTPS only proxy_set_header X_FORWARDED_PROTO https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; You can see a full config file for nginx/mongrel here: http://brainspl.at/nginx.conf.txt -Ezra On Dec 29, 2006, at 8:18 PM, Vishnu Gopal wrote:> Nginx cannot correctly set X-Forwarder-For headers right? Which means > all your requests seem to end up coming from localhost. Is this still > true or has something changed? > > Vish > > On 12/30/06, Zed A. Shaw <zedshaw at zedshaw.com> wrote: >> On Fri, 29 Dec 2006 17:12:13 -0800 >> "Eden Li" <eden.li at gmail.com> wrote: >> >>> Apologies if this has been mentioned before, but is there an updated >>> comparison of all the different mongrel implementation methods out >>> there? >>> >>> I''ve been on lighty+pen+mongrel for awhile and I don''t really see a >>> compelling to switch to nginx... unless someone else has experience >>> with both and can elaborate on the goodness of nginx vs lighty/ >>> pen... >> >> Well, nginx would be one component less than your current combo, >> and has a equally simple configuration. Unless you have a lighty >> specific component the lowered complexity would be a main motive. >> nginx also supports fcgi. >> >> Otherwise, if it ain''t broke, don''t fix it. >> >> -- >> Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu >> http://www.zedshaw.com/ >> http://www.awprofessional.com/title/0321483502 -- The Mongrel Book >> http://mongrel.rubyforge.org/ >> http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help. >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)
I think my configuration is not complex at all, my debian is a fresh install with just apache 2.2.3 (just one apache version),svn, ruby, rails, mongrel, capistrano and that''s all. Everything works quite well, I cant deploy my local application using capistrano... mongrel cluster is ok and the process of deploying works well. The only problem I have is that I can''t access my "just deployed" application through apache... and I want to use apache. So you have no idea to where my error come from ? Zed A. Shaw a écrit : On Fri, 29 Dec 2006 23:22:51 +0100 "Pou Belle" wrote: Hi everybody, I just suscribe to the list because I have a problem using mongrel and mongrel_cluster... I setup a server (debian unstable wich provide apache 2.2.3 as a pakage) but I have an error when I try to access my application : ERROR 403 : Forbidden, You don''t have permission to access / on this server. Your configuration seems rather complex. And it looks like you might have multiple versions of apache on that machine. I''d take a step back, start with a fresh config on a pristine machine, and do the simplest configuration you can. Then slowly build it up to what you need. If that all works then you''ll have a stable base to compare with.
Charles Brian Quinn
2006-Dec-30 13:57 UTC
[Mongrel] Error : No protocol handler was valid for the URL...
What happens if you put an index.html file in public and try to access that: http://demo.site.com/index.html or, since you''ve got the maintencence.html rewrite rule, put a maintenence.html file in the system dir and see if it automatically loads that.... Could you try this conf instead: <VirtualHost *:80> ServerName myapp.com ProxyPass / http://www.myapp.com:8000/ ProxyPassReverse / http://www.myapp.com:8000 ProxyPreserveHost on </VirtualHost> with a mongrel listening on 8000 (you may have to use localhost if you''ve only bound your mongrel to 127.0.0.1 in the configuration). if that works, like Zed, says, start to add back your balancer and the rewrite rules and increase the complexity and see what happens.... if that apache install coexists with the 2.054, it could be reading that one''s doc root and skipping over yours. where''s your .conf file for that app, and where does it get loaded, starting from, say httpd.conf. For example, /etc/httpd.conf loads vhosts.d/mysite.conf , etc.... good luck, -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com slingshot hosting: www.slingshothosting.com On 12/30/06, Wouf <woufdraft at gmail.com> wrote:> > I think my configuration is not complex at all, my debian is a fresh > install with just apache 2.2.3 (just one apache version),svn, ruby, rails, > mongrel, capistrano and that''s all. > > Everything works quite well, I cant deploy my local application using > capistrano... mongrel cluster is ok and the process of deploying works well. > The only problem I have is that I can''t access my "just deployed" > application through apache... and I want to use apache. > > So you have no idea to where my error come from ? > > Zed A. Shaw a ?crit : > On Fri, 29 Dec 2006 23:22:51 +0100 > "Pou Belle" <woufdraft at gmail.com> wrote: > > > > Hi everybody, > > I just suscribe to the list because I have a problem using mongrel and > mongrel_cluster... I setup a server (debian unstable wich provide apache > 2.2.3 as a pakage) but I have an error when I try to access my application : > ERROR 403 : Forbidden, You don''t have permission to access / on this > server. > > > Your configuration seems rather complex. And it looks like you might have > multiple versions of apache on that machine. > > I''d take a step back, start with a fresh config on a pristine machine, and > do the simplest configuration you can. Then slowly build it up to what you > need. If that all works then you''ll have a stable base to compare with. > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > >
I succeed with your type of configuration, thanks. Charles Brian Quinn a ?crit :> What happens if you put an index.html file in public and try to access that: > > http://demo.site.com/index.html > > or, since you''ve got the maintencence.html rewrite rule, put a > maintenence.html file in the system dir and see if it automatically > loads that.... > > Could you try this conf instead: > > <VirtualHost *:80> > ServerName myapp.com > > ProxyPass / http://www.myapp.com:8000/ > ProxyPassReverse / http://www.myapp.com:8000 > ProxyPreserveHost on > </VirtualHost> > > with a mongrel listening on 8000 (you may have to use localhost if > you''ve only bound your mongrel to 127.0.0.1 in the configuration). > > if that works, like Zed, says, start to add back your balancer and the > rewrite rules and increase the complexity and see what happens.... > > if that apache install coexists with the 2.054, it could be reading > that one''s doc root and skipping over yours. where''s your .conf file > for that app, and where does it get loaded, starting from, say > httpd.conf. For example, /etc/httpd.conf loads vhosts.d/mysite.conf , > etc.... > > good luck, > >