Hi, I''ve configured a rails application on my VPS to run on two mongrels. When I run curl on localhost, the starting page comes up fine. That is, mongrel is serving the app perfectly. The problem arises when trying to access the app on my ip through apache. I get a 403 error. Just to test things out, I''ve set generous permissions on the entire rails directory structure still to no avail. I''ve also set up a non-rails virtual host, and everything works fine there. So I doubt that it''s a vhost problem. What could be the problem here? Any insights would be awesome; to me, it''s been a real gordian knot. Thanks, Kyle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I''ve configured a rails application on my VPS to run on two mongrels. When I run curl on localhost, the starting page comes up fine. That is, mongrel is serving the app perfectly. The problem arises when trying to access the app on my ip through apache. I get a 403 error. Just to test things out, I''ve set generous permissions on the entire rails directory structure still to no avail. I''ve also set up a non-rails virtual host, and everything works fine there. So I doubt that it''s a vhost problem. What could be the problem here? Any insights would be awesome; to me, it''s been a real gordian knot. Thanks, Kyle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
knb wrote:> Hi, > > I''ve configured a rails application on my VPS to run on two > mongrels. When I run curl on localhost, the starting page comes up > fine. That is, mongrel is serving the app perfectly. > > The problem arises when trying to access the app on my ip through > apache. I > get a 403 error. Just to test things out, I''ve set generous > permissions on the entire rails directory structure still to no avail. > > I''ve also set up a non-rails virtual host, and everything works fine > there. So I doubt that it''s a vhost problem. > > What could be the problem here? Any insights would be awesome; to me, > it''s been a real gordian knot.Hard to say without seeing your Apache config and Mongrel config/command line. -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, Michael. Here''s the relevant config info. <VirtualHost *:80> ServerName lessonkit.com DocumentRoot /home/kyle/public_html/lessonkit.com/current/public <Directory "/home/kyle/public_html/lessonkit.com/current/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> RewriteEngine On <Proxy balancer://mongrel_cluster> BalancerMember http://127.0.0.1:5000 BalancerMember http://127.0.0.1:5001 </Proxy> <VirtualHost *:80> ServerName lessonkit.com DocumentRoot /home/kyle/public_html/lessonkit.com/current/public <Directory "/home/kyle/public_html/lessonkit.com/current/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> RewriteEngine On <Proxy balancer://mongrel_cluster> BalancerMember http://127.0.0.1:5000 BalancerMember http://127.0.0.1:5001 </Proxy> RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /maintenance.html [L] RewriteRule ^/$ /index.html [QSA] # Rewrite to check for Rails cached pages with .html extentions RewriteRule ^([^.]+)$ $1.html [QSA] # All dynamic requests get sent to the cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://your_app_cluster%{REQUEST_URI} [P,QSA,L] # Deflate for clients that support it. AddOutputFilterByType DEFLATE text/html text/plain text/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # Error and access logs. ErrorLog logs/your_app_error_log CustomLog logs/your_access_log combined </VirtualHost> Here''s my mongrel config: cwd: /home/kyle/public_html/lessonkit.com/current log_file: /home/kyle/public_html/lessonkit.com/current/log/mongrel.log port: "5000" environment: production address: 127.0.0.1 pid_file: /home/kyle/public_html/lessonkit.com/current/tmp/pids/ mongrel.pid servers: 2 On Oct 3, 9:54 am, Michael Wang <rails-u...-JtyympAsP2K7zZZRDBGcUA@public.gmane.org> wrote:> knb wrote: > > Hi, > > > I''ve configured a rails application on my VPS to run on two > > mongrels. When I run curl on localhost, the starting page comes up > > fine. That is, mongrel is serving the app perfectly. > > > The problem arises when trying to access the app on my ip through > > apache. I > > get a 403 error. Just to test things out, I''ve set generous > > permissions on the entire rails directory structure still to no avail. > > > I''ve also set up a non-rails virtual host, and everything works fine > > there. So I doubt that it''s a vhost problem. > > > What could be the problem here? Any insights would be awesome; to me, > > it''s been a real gordian knot. > > Hard to say without seeing your Apache config and Mongrel config/command > line. > > -- > Michael Wang--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 3 Oct 2007, at 15:09, knb wrote:> > Thanks, Michael. > > Here''s the relevant config info. >Well either your mail client has munged your config or it''s rather malformed. You''re not closing the VirtualHost ''tags'', sections are duplicated, you''ve nested the balancer declarations inside the Virtual host stuff etc... In particular you declare your cluster as mongrel_cluster, but in your rewrite rule you''ve put your_app_cluster Fred> <VirtualHost *:80> > ServerName lessonkit.com > DocumentRoot /home/kyle/public_html/lessonkit.com/current/public > > <Directory "/home/kyle/public_html/lessonkit.com/current/public"> > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > </Directory> > > RewriteEngine On > <Proxy balancer://mongrel_cluster> > BalancerMember http://127.0.0.1:5000 > BalancerMember http://127.0.0.1:5001 > </Proxy> > > <VirtualHost *:80> > ServerName lessonkit.com > DocumentRoot /home/kyle/public_html/lessonkit.com/current/public > > <Directory "/home/kyle/public_html/lessonkit.com/current/public"> > Options FollowSymLinks > AllowOverride None > Order allow,deny > Allow from all > </Directory> > > RewriteEngine On > <Proxy balancer://mongrel_cluster> > BalancerMember http://127.0.0.1:5000 > BalancerMember http://127.0.0.1:5001 > </Proxy> > > RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f > RewriteCond %{SCRIPT_FILENAME} !maintenance.html > RewriteRule ^.*$ /maintenance.html [L] > RewriteRule ^/$ /index.html [QSA] > > # Rewrite to check for Rails cached pages with .html extentions > RewriteRule ^([^.]+)$ $1.html [QSA] > > # All dynamic requests get sent to the cluster > RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f > RewriteRule ^/(.*)$ balancer://your_app_cluster%{REQUEST_URI} > [P,QSA,L] > > # Deflate for clients that support it. > AddOutputFilterByType DEFLATE text/html text/plain text/xml > BrowserMatch ^Mozilla/4 gzip-only-text/html > BrowserMatch ^Mozilla/4\.0[678] no-gzip > BrowserMatch \bMSIE !no-gzip !gzip-only-text/html > > # Error and access logs. > ErrorLog logs/your_app_error_log > CustomLog logs/your_access_log combined > > </VirtualHost> > > Here''s my mongrel config: > > cwd: /home/kyle/public_html/lessonkit.com/current > log_file: /home/kyle/public_html/lessonkit.com/current/log/mongrel.log > port: "5000" > environment: production > address: 127.0.0.1 > pid_file: /home/kyle/public_html/lessonkit.com/current/tmp/pids/ > mongrel.pid > servers: 2 > > > On Oct 3, 9:54 am, Michael Wang <rails-u...-JtyympAsP2K7zZZRDBGcUA@public.gmane.org> wrote: >> knb wrote: >>> Hi, >> >>> I''ve configured a rails application on my VPS to run on two >>> mongrels. When I run curl on localhost, the starting page comes up >>> fine. That is, mongrel is serving the app perfectly. >> >>> The problem arises when trying to access the app on my ip through >>> apache. I >>> get a 403 error. Just to test things out, I''ve set generous >>> permissions on the entire rails directory structure still to no >>> avail. >> >>> I''ve also set up a non-rails virtual host, and everything works fine >>> there. So I doubt that it''s a vhost problem. >> >>> What could be the problem here? Any insights would be awesome; >>> to me, >>> it''s been a real gordian knot. >> >> Hard to say without seeing your Apache config and Mongrel config/ >> command >> line. >> >> -- >> Michael Wang > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I had a similar problem. I solved the problem by loading the proxy modules: LoadModule proxy_module /usr/lib/apache2-prefork/ mod_proxy.so LoadModule proxy_http_module /usr/lib/apache2-prefork/ mod_proxy_http.so in the apache configuration. Without the proxy-http module apache delivers a 403 access denied regards -- andi On 3 Okt., 15:37, knb <kyleban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''ve configured a rails application on my VPS to run on two > mongrels. When I run curl on localhost, the starting page comes up > fine. That is, mongrel is serving the app perfectly. > > The problem arises when trying to access the app on my ip through > apache. I > get a 403 error. Just to test things out, I''ve set generous > permissions on the entire rails directory structure still to no avail. > > I''ve also set up a non-rails virtual host, and everything works fine > there. So I doubt that it''s a vhost problem. > > What could be the problem here? Any insights would be awesome; to me, > it''s been a real gordian knot. > > Thanks, > > Kyle--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---