Letting Apache server public/sitemaps/* files?
|
|
Hello there, quick Q: I am generating a / multiple sitemap.xml(.gz) via a rake task and place them in the public/sitemaps/ folder of my rails app. However, when trying to access these files, mongrel/rails seems to handle them instead of apache serving the static files… how and where would I change the appropriate config to let apache take care of these files? Cheers and thanks, |
|
|
:) Anyone? |
|
|
To answer my own question, I took my rails-apps config under /etc/apache2/sites-available/ and added this block right above the Proxy balancer: delcaration: # Configure mongrel_clusterProxyPass /images ! … Which works now. |
|
|
I think that the setup of the Apache config is supposed to only proxy things which do not exist as physical files. If you look in /etc/apache2/brightbox-common you will see: # Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]Odd that it seems to be sending your sitemap request through to the balancers anyway though. Glad you have a solution now. |
|
|
David, yep I did see that rule but for some reason my default fallback route (rails app) kicked in and was run/displayed. All’s good now, thanks! :) -J |