[英]What are the 'correct' permission setting for django site running on apache2 server
[英]Apache2 server shows different interface with django server , at the same site
您沒有正確告訴Apache靜態媒體資產在哪里。 請參閱以下內容中描述的Alias指令:
這可能很簡單,您必須將django admin靜態文件鏈接到apache2使用的生產文件。
let say that your web production files are in /var/www/www.localhost.com/
in the settings.py files add the path ADMIN_MEDIA_PREFIX = '/localhost/admin_media/'
now you have to link the static file to django default admin static files :
by using [apps_path_to_admin_static]$ sudo ln -s [path to django]/static/admin
example :
ali@host:/var/www/www.localhost.com/localhost/static$ sudo ln - s
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin
in apache2 virtualhost add the path:
Alias /admin_media /var/www/www.localhost.com/localhost/static/admin_media
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.