https://www.codementor.io/overiq/deploying-django-project-to-digitalocean-xt5s538tp
sudo nano /etc/nginx/sites-available/djangobin
sudo service nginx restart
server {
server_name www.soluball.com;
rewrite ^(.*) http://domain_name.com$1 permanent;
}
server {
server_name https://www.soluball.com;
rewrite ^(.*) http://domain_name.com$1 permanent;
}
server {
server_name 18.141.82.48;
rewrite ^(.*) http://domain_name.com$1 permanent;
}
server {
server_name soluball.com;
access_log off;
location /static/ {
alias /home/ubuntu/soluball-django/static/;
}
location / {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
}
Django