【问题标题】:django with nginx + uwsgi does not show templates带有 nginx + uwsgi 的 django 不显示模板
【发布时间】:2012-08-13 17:40:11
【问题描述】:

在 Django 开发服务器上,django app 运行良好。但是一旦我设置了生产测试运行,我只得到文本内容,其中模板视图没有按预期显示。我怎么了?

我有 django 1.5 最新版本。 Nginx - 0.8.54 uWSGI - 1.2.5

uWSGI 的 cmd:

  sudo uwsgi --ini test.ini

test.ini 内容:

[uwsgi]
# set the http port
http = :8080
python_path = /home/test/Desktop/IT_mgmt/IT_mgmt/settings.py/
# change to django project directory
chdir = /home/test/Desktop/IT_mgmt
# load django
module = IT_mgmt.wsgi

【问题讨论】:

    标签: django nginx uwsgi fapws3


    【解决方案1】:

    Nginx 应该管理你的静态文件,尝试访问你的 CSS 或 JS ...

    nginx.conf 例如:

    location ^~ /static/ {
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-18
      • 2012-10-01
      • 2014-05-31
      • 2017-08-07
      • 2019-04-01
      • 2020-06-29
      • 2016-10-03
      • 2011-10-10
      相关资源
      最近更新 更多