【发布时间】:2015-01-30 18:05:47
【问题描述】:
命令 -
curl -I http://stage.servername.com/
响应 -
HTTP/1.1 301 MOVED PERMANENTLY
Server: nginx/1.4.6 (Ubuntu)
Date: Tue, 02 Dec 2014 13:18:45 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
x-frame-options: DENY
Location: https://127.0.0.1:8000/
x-content-type-options: nosniff
P3P: CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"
以下是我的 nginx 设置 - https://gist.github.com/anonymous/f84c5b7bed41b40a3cfd
gunicorn 服务器在 8000 端口运行。
(bz)username@ip-172-31-4-167:~$ ps aux|grep gunicorn
username 2283 0.0 0.5 51912 11028 ? S 11:42 0:00 /home/username/Envs/bz/bin/python /home/username/Envs/bz/bin/gunicorn bizchat.wsgi:application --workers=3 -D
username 2288 0.0 1.3 136244 28428 ? S 11:42 0:00 /home/username/Envs/bz/bin/python /home/username/Envs/bz/bin/gunicorn bizchat.wsgi:application --workers=3 -D
username 2289 0.0 1.3 136260 28428 ? S 11:42 0:00 /home/username/Envs/bz/bin/python /home/username/Envs/bz/bin/gunicorn bizchat.wsgi:application --workers=3 -D
username 2290 0.0 1.7 144484 36860 ? S 11:42 0:00 /home/username/Envs/bz/bin/python /home/username/Envs/bz/bin/gunicorn bizchat.wsgi:application --workers=3 -D
username 3452 0.0 0.0 10468 924 pts/0 S+ 13:09 0:00 grep --color=auto gunicorn
nginx 服务正常。
然而,我正在使用django-secure,但带有以下标志SSLIFY_DISABLE=True
当我打开 url.myapp.com 时,redirects 到 https://127.0.0.1:8000
任何想法,出了什么问题?
【问题讨论】:
标签: python django nginx amazon-ec2 gunicorn