This is my yo_nginx.conf file:
upstream django {
server unix:///home/ubuntu/test/yo/yo.sock; # for a file socket, check if the path is correct
}
# Redirect all non-encrypted to encrypted
server {
server_name 52.89.220.11;
listen 80;
return 301 https://52.89.220.11$request_uri;
}
# configuration of the server
server {
# the port your site will be served on
listen 443 default ssl;
# the domain name it will serve for
server_name 52.89.220.11; # substitute your machine's IP address or FQDN
charset utf-8;
ssl on;
ssl_certificate /etc/ssl/certs/api.ajayvision.com.chain.crt;
ssl_certificate_key /etc/ssl/private/api.ajayvision.com.key;
# max upload size
client_max_body_size 75M; # adjust to taste
# Finally, send all non-media requests to the Django server.
location / {
proxy_set_header X-Forwarded-Proto https;
include /home/ubuntu/test/yo/uwsgi_params;
uwsgi_param UWSGI_SCHEME https;
uwsgi_pass_header X_FORWARDED_PROTO;
uwsgi_pass django;
}
}
All I want to do is implement SSL on my django app but when I open the domain, it opens up in normal HTTP port. Also when I open the domain using https, it says check your connection. Am I missing something in my conf file? Also, I don't have a proxy set up.