简体   繁体   English

Django不提供管理静态文件(Apache,mod_wsgi)

[英]Django not serve admin static files (Apache, mod_wsgi)

I have a problem with admin static file (css, javascript, image)... I can't show this right template... 我的管理静态文件(css,javascript,图像)有问题...我无法显示此正确的模板...

OS : Ubuntu 12.10 / Apache2 / mod_wsgi / Django 1.4 操作系统:Ubuntu 12.10 / Apache2 / mod_wsgi / Django 1.4

My apache config gile : 我的Apache配置吉尔:

<VirtualHost *:80>
WSGIScriptAlias / /var/www/myhost.com/apache/buzzbal.wsgi

ServerName www.myhost.com
Alias /static /var/www/myhost.com/static/

<Directory /var/www/myhost.com/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Use: 采用:

Alias /static/ /var/www/myhost.com/static/

That is, trailing slash on both sub URL mount point as well as the target path. 也就是说,在子URL挂载点和目标路径上都使用斜杠。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM