简体   繁体   English

Django 多个站点使用 nginx 和 gunicorn

[英]Django multiple sites using nginx and gunicorn

I am serving multiple websites using nginx and gunicorn and I would like to add another one.我正在使用 nginx 和 gunicorn 为多个网站提供服务,我想添加另一个。 Sadly my lack of experience is limiting me, I have some experience with webdesign but always struggle on the server side...|-( (I am using Django because of my Python preference in scientific analysis).遗憾的是,我缺乏经验限制了我,我有一些网页设计经验,但总是在服务器端挣扎......|-((我使用 Django 因为我在科学分析中偏好 Python)。

My problem: The new site seems to refer to the port used by another.我的问题:新站点似乎引用了另一个使用的端口。 Checking the gunicorn status I see that the site is running although nginx seems to be unable to refer to the correct Django folder.检查 gunicorn 状态我发现该站点正在运行,尽管 nginx 似乎无法引用正确的 Django 文件夹。 Could someone point me in the right direction?有人能指出我正确的方向吗? I have been looking around for the last hour or so...我过去一个小时左右一直在四处寻找......

(I didn't include any code for now as I am not sure where the error might lie at this point...) (我现在没有包含任何代码,因为我不确定此时错误可能出在哪里......)

Next day update: So I finally came across a post mentioning that the origin of the error might lie on the browser side.第二天更新:所以我终于看到一篇文章提到错误的根源可能在于浏览器端。 I deleted my recent history, this has fixed the error.我删除了我最近的历史记录,这修复了错误。 I believe I somehow loaded a https certificate belonging to one of the other sites, this is no longer the case!我相信我以某种方式加载了属于其他站点之一的 https 证书,但情况已不再如此!

I came across the solution, it was a browser side fix.我遇到了解决方案,它是浏览器端修复。 The answer is provided in an update to the original question.答案在原始问题的更新中提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM