Hi jdMorgan,
Here copied is the change that my developer did after I showed him your comments. Did he do it correctly? Will this work? Thanks so much!
DM
Here is the included file /etc/apache2/vhosts.d/www.mysite.com.conf
----------------------------------------------------------------------------------------------------------------------------------
<VirtualHost 208.75.151.227:80>
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /home/mysite/apps/production/mysite/current/public
<Directory "/home/mysite/apps/production/mysite/current/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Deny from 189.188.67.73
</Directory>
ProxyPass / balancer://mysite_production_cluster/
ProxyPassReverse / balancer://mysite_production_cluster/
RewriteEngine On
# Make sure people go to www.myapp.com, not myapp.com
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule ^(.*)$ [
mysite.com$1...] [R=301,L]
RewriteCond %{HTTP_HOST} ^208.75.151.227$ [NC]
RewriteCond %{REQUEST_URI} !^/google.*.html$ [NC]
RewriteRule ^(.*)$ [
mysite.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://mysite_production_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/www.mysite.com_errors_log
CustomLog /var/log/apache2/www.mysite.com_log combined
</VirtualHost>