apache +mod_wsgi + django deploying

来源:互联网 发布:淘宝订单号 规则 编辑:程序博客网 时间:2024/05/22 17:15

具体说明,请参考。。。

http://blog.csdn.net/21aspnet/article/details/6604814

问题:不知道为什么,F5刷新,静态文件一直返回304(发送了请求),好像配置了与没配置都一样?


LoadModule headers_module modules/mod_headers.so

LoadModule expires_module modules/mod_expires.so

<IfModule mod_expires.c>

  ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault                          "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
  ExpiresByType text/cache-manifest       "access plus 0 seconds"

# your document html
  ExpiresByType text/html                 "access plus 0 seconds"

# data
  ExpiresByType text/xml                  "access plus 0 seconds"
  ExpiresByType application/xml           "access plus 0 seconds"
  ExpiresByType application/json          "access plus 0 seconds"

# rss feed
  ExpiresByType application/rss+xml       "access plus 1 hour"

# favicon (cannot be renamed)
  ExpiresByType image/x-icon              "access plus 1 week"

# media: images, video, audio
  ExpiresByType image/gif                 "now plus 1 month"
  ExpiresByType image/png                 "now plus 1 month"
  ExpiresByType image/jpg                 "now plus 1 month"
  ExpiresByType image/jpeg                "now plus 1 month"
  ExpiresByType video/ogg                 "now plus 1 month"
  ExpiresByType audio/ogg                 "now plus 1 month"
  ExpiresByType video/mp4                 "now plus 1 month"
  ExpiresByType video/webm                "now plus 1 month"

# htc files  (css3pie)
  ExpiresByType text/x-component          "now plus 1 month"

# webfonts
  ExpiresByType font/truetype             "now plus 10 month"
  ExpiresByType font/opentype             "now plus 10 month"
  ExpiresByType application/x-font-woff   "now plus 10 month"
  ExpiresByType image/svg+xml             "now plus 10 month"
  ExpiresByType application/vnd.ms-fontobject "now plus 10 month"

# css and javascript
  ExpiresByType text/css                  "now plus 20 months"
  ExpiresByType application/javascript    "now plus 20 months"
  ExpiresByType text/javascript           "now plus 20 months"

  <IfModule mod_headers.c>
    Header append Cache-Control "public"
  </IfModule>

</IfModule>

FileETag None

#<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
#Header unset Last-Modified
#</FilesMatch>

LoadModule wsgi_module modules/mod_wsgi-win32-ap22py27-3.3.so

Alias /media/ E:/products/mysite/media/
WSGIScriptAlias / E:/products/wsgi.py
WSGIPythonPath E:/products/


<Directory "E:/products">
   Order Deny,Allow
   Allow from all
</Directory>

原创粉丝点击