使用apache部署django程序的时候如何配置静态文件支持?

使用apache部署django程序的时候如何配置静态文件支持?

使用apache部署django程序的时候如何配置静态文件支持,下面红色字体部分为配置静态文件支持:

<VirtualHost *:80>
DocumentRoot /var/other/django/ibooklist/
ServerName *.chedushi.com
ServerAlias *.chedushi.com
WSGIScriptAlias / /var/other/django/ibooklist/ibooklist/wsgi.py
Alias /media/ /var/other/django/ibooklist/media/
Alias /static/ /var/other/django/ibooklist/static/

<Directory /var/other/django/ibooklist/static/>
Order deny,allow
Allow from all
</Directory>

<Directory /var/other/django/ibooklist/media/>
Order deny,allow
Allow from all
</Directory>

<Directory /var/other/django/ibooklist/>
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

发表评论

电子邮件地址不会被公开。 必填项已用*标注