我正在尝试在 Digital Ocean 服务器上使用 Cookiecutter。(不使用 Docker)
我按照指示在 Ubuntu 16 上安装了 Django、Postgres 和 Gunicorn。 https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
我无法克服允许的主机错误。
DisallowedHost at /
Invalid HTTP_HOST header: '128.199.100.100:8000'.
You may need to add '128.199.100.100' to ALLOWED_HOSTS
我在production.py中有设置
ALLOWED_HOSTS = env.list ( 'DJANGO_ALLOWED_HOSTS',
default = [ '128.199.100.100' ] )
我是否需要更改任何设置以使其成为生产环境?
Cookiecutter 站点上的唯一文档是针对 pythonAnywere 和 Docker 的。http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-pythonanywhere.html
我只想要一个简单的 DO 安装。找不到任何文件?
谢谢你。