【问题标题】:Django, Nginx, Gunicorn. Ubuntu 16.04 errorDjango,Nginx,Gunicorn。 Ubuntu 16.04 错误
【发布时间】:2017-12-31 14:48:50
【问题描述】:

我正在尝试用这个来运行服务器 - https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04#create-a-gunicorn-systemd-service-file

当我尝试运行某些命令时,我收到此错误 - sudo: 无法解析主机 giver.local

可能是什么问题?

【问题讨论】:

  • 这太模糊了。 你运行了什么命令,究竟是什么?
  • 例如 sudo systemctl start gunicorn

标签: django nginx gunicorn


【解决方案1】:

该错误表明您的 /etc/hostsetc/hostname 有问题

https://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none

【讨论】:

    【解决方案2】:

    检查/etc/hosts 文件中的这一行:

    127.0.0.1    localhost
    

    假设它正确打印错误,giver.local 将代替 localhost

    如果这不起作用,我建议删除该 droplet 并重新开始,因为此错误并不常见(据我或 Google 所知)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-27
      • 2017-10-01
      • 2012-05-28
      • 2017-05-17
      • 2014-06-28
      • 2018-12-05
      • 2015-03-31
      • 2018-01-01
      相关资源
      最近更新 更多