I am following this guide in order to set up one Django app with nginx.
I have installed Nginx and I can access it on 127.0.0.1
or 127.0.0.1:80
.
I have this configuration file:
upstream django {
# connect to this socket
server 127.0.0.1:8001;
}
server {
# the port your site will be served on
listen 8000 default_server;
listen [::]:8000 default_server;
server_name 127.0.0.1;
charset utf-8;
#Max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /home/dwv/Documents/FMQDjango/BetApp/media;
}
location /static {
alias /home/dwv/Documents/FMQDjango/BetApp/static;
}
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params;
}
}
I have symlinked this file to /etc/nginx/sites-enabled/
I still can access the "welcome message" on 127.0.0.1:80
but i cannot connect to 127.0.0.1:8000
.
I have a file called porto.jpg
on my media folder, then I try to access it on 127.0.0.1:8000/media/porto.jpg
but i still cannot connect to server.
Anyone knows what is the problem?