<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot D:/myapp/public
<Directory "D:/myapp/public">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Configure mongrel instances
<Proxy balancer://mongrel_cluster>
BalancerMember http://127.0.0.1:4001
BalancerMember http://127.0.0.1:4002
BalancerMember http://127.0.0.1:4003
BalancerMember http://127.0.0.1:4004
BalancerMember http://127.0.0.1:4005
</Proxy>
RewriteEngine On
# Uncomment for rewrite debugging
#RewriteLog logs/your_app_deflate_log deflate
#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
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/your_app_deflate_log deflate
ErrorLog logs/your_app_error_log
CustomLog logs/your_access_log combined
</VirtualHost>
I've just followed some tutorials with this configuration and in fact I
really don't know what I was doing there, so any help with that will be
great. :-) I think I need to add some rule for mod_rewrite, but for now
I really know nothing about it.
Is there any chance to get it working, or only way to do it is to
rewrite my app to not using slashes in route variables?
thanks
--
Posted via http://www.ruby-forum.com/.
<VirtualHost *:80>
AllowEncodedSlashes On
ServerName yourdomain.com
.
.
.
and now it shows Rails 404 instead of Apache 404...
Any ideas?
--
Posted via http://www.ruby-forum.com/.
This add screwed up this route
map.connect ":controller/:action/edit/:file/:id",
:mode => "edit",
:requirements => {:file => /.*/},
:file => nil,
:id => nil
But splitting it to
map.connect ":controller/:action/edit/:id/:file",
:mode => "edit",
:requirements => {:file => /.*/, :id => /\d+/},
:file => nil
map.connect ":controller/:action/edit/:file",
:mode => "edit",
:requirements => {:file => /.*/},
:file => nil
has done the work, and now everything seems to work well.
Once again, thank you very much for fast help.
--
Posted via http://www.ruby-forum.com/.