Thursday, May 22, 2008

Getting Javascript and CSS files working with passenger (locally)

After looking around why my .js or .css files won't load, I found that my Apache's error_log had a lot of these lines:

[Thu May 22 01:27:26 2008] [error] [client 127.0.0.1] client denied by server configuration: /Users/art/development/projects/rails/rchat/public/javascripts/application.js, referer: http://rchat_prod.local/

Adding AllowOverride and the Order directives, fixed it:

<VirtualHost *>
ServerName rchat_prod.local
DocumentRoot /Users/art/development/projects/rails/rchat/public
<Directory "/Users/art/development/projects/rails/rchat/public"%gt;
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

No comments: