On 9/11/06, Zed Shaw <[EMAIL PROTECTED]> wrote:
<snip>
</snip>
<snip>
Hmmm, that is only there if there is no X_FORWARDED_FOR header from a
proxy server and Mongrel has to resolve the host. It means you have a
poorly setup DNS server that can't resolve fast enough so the process is
getting stuck.
How are is your proxy setup?
</snip>
Now this is weird...here I am talking about standalone mongrel server...which is not proxied through apache. I access the page..manually through the IP address and port (*just for development though*).
Basically, all my server and rails code is there on a Ubuntu machine and we access(*use*) it through a Windows Machine.
Anyway, I also have the mongrel cluster setup on the same machine, which runs in production mode and is proxied through Apache.
My Proxy Configuration is, pretty default one suggested by Coda and Philip:
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/webfront/public
ServerName foobar.com
ServerAlias *.foobar.com
<Directory /var/www/webfront/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
# Make sure people go to www.myapp.com, not myapp.com
RewriteCond %{HTTP_HOST} ^foobar.com$ [NC]
RewriteRule ^(.*)$ http://www.foobar.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
#ProxyPass / balancer://mongrel_cluster
#ProxyPassReverse / balancer://mongrel_cluster
ProxyPreserveHost On
# 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
</VirtualHost>
_______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users