【问题标题】:Nginx: Difference between unix:/ and unix:///Nginx:unix:/ 和 unix:/// 之间的区别
【发布时间】:2012-12-26 17:18:26
【问题描述】:

两者之间的确切区别是什么:

uwsgi_pass unix:/foo/bar.sock

uwsgi_pass unix:///foo/bar.sock

在 nginx cfg 中获取 uwsgi 通行证?

django 生产环境的更好选择是什么?

【问题讨论】:

  • 我不会提供答案,因为我不是 100% 确定,但是 IIRC,// 基本上是 unix:// 声明的一部分,第三个 / 是文件路径的开头。

标签: django nginx uwsgi


【解决方案1】:

两者的区别:

uwsgi_pass unix:/foo/bar.sock

uwsgi_pass unix:///foo/bar.sock

与between相同:

uwsgi_pass unix:/foo/bar.sock

uwsgi_pass unix:////////////////foo////bar.sock

或者,与between相同:

root /data/www/site.ru;

root ///data/www/site.ru;

我敢肯定,现在你已经明白了。 ;)

【讨论】:

    【解决方案2】:

    Docs 推荐使用uwsgi_pass unix:/var/run/example.com.sock; 语法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-18
      • 1970-01-01
      • 2015-07-02
      • 1970-01-01
      相关资源
      最近更新 更多