Created
November 10, 2012 16:33
-
-
Save timonweb/4051605 to your computer and use it in GitHub Desktop.
Serving static files for Django on Webfaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put after other LoadModule lines | |
LoadModule alias_module modules/mod_alias.so | |
LoadModule authz_host_module modules/mod_authz_host.so | |
LoadModule expires_module modules/mod_expires.so | |
... | |
<VirtualHost *:<webapp-port>> | |
... | |
# after WSGIScriptAlias | |
Alias /media /home/<username>/webapps/<wsgi-app>/<virtualenv-dor>/media/ | |
<Directory /home/<username>/webapps/<wsgi-app>/<virtualenv-dor>/media> | |
Order allow,deny | |
Allow from all | |
ExpiresActive On | |
ExpiresDefault "modification plus 12 hours" | |
</Directory> | |
... | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment