Apache not serving django admin static files

前端 未结 4 1176
情歌与酒
情歌与酒 2020-12-02 09:18

Let me thanks you guys at the Stack Overflow community for helping me with various Django and Apache (with mod_wsgi) errors. I\'ve asked about 5 related questions so far and

4条回答
  •  春和景丽
    2020-12-02 09:52

    I got solution, I looked at the access_log files inside /var/log/httpd/

    127.0.0.1 - - [28/Dec/2013:14:49:20 -0500] "GET /static/admin/css/login.css HTTP/1.1" 200 836 "http://127.0.0.1/admin/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
    

    so I added following tags in /etc/httpd/conf/httpd.conf file,

    Alias /static /usr/lib/python2.6/site-packages/django/contrib/admin/static
    

    inside tag

    then I restarted service using

    service httpd restart
    

    and it Works!!!

提交回复
热议问题