Nginx не обслуживает изображение Джанго
Я пытаюсь следовать учебнику вhttp://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html, Я получил доhttp://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html#basic-nginx-test, Следуя указаниям, которые у меня есть:
(env1)ubuntu@ip-172-31-28-196:~$ sudo /etc/init.d/nginx start
(env1)ubuntu@ip-172-31-28-196:~$ ls
host_type.py requirements.txt test.py tproxy
Однако, когда я иду в свой экземпляр Ubuntu EC2 по адресу:
http://52.10.**.***:8000/media/media.jpg
Время ожидания запроса истекло. Что я делаю неправильно?
РЕДАКТИРОВАТЬ: - файл конфигурации
# mysite_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
# server unix:///path/to/your/mysite/mysite.sock; # for a file socket
server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 8000;
# the domain name it will serve for
server_name 52.**.***.**; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias ./media; # your Django project's media files - amend as required
}
location /static {
alias ./static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include ./uwsgi_params; # the uwsgi_params file you installed
}
}
Журнал ошибок nginx:
2015/03/03 18:06:06 [emerg] 1989#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2015/03/03 18:06:06 [emerg] 1989#0: bind() to [::]:80 failed (98: Address already in use)
2015/03/03 18:06:06 [emerg] 1989#0: still could not bind()