@benrebia
<<<<Domains and ip number replace them with “xxxx” and “999” for obvious reasons of privacy and security in this publication>>>
Hi, I really need help with this. I did according to the steps of the tutorial but with some changes, because my site is already working well on the web and I do not want it to fall.
I explain: I have a domain www.xxxxxx.cl which is working super well, all this works for me in / home / max / myproject
/ etc / nginx / sites-available / myproject
Contains:
Server {
Listen 80;
Servername 99.999.999.99 xxx.cl www.xxx.cl;
500M clientmaxbodysize;
Location = /favicon.ico {accesslog off; Lognot_found off; }
Location / static / {
Root / home / max / myproject;
}
Location / {
Include proxyparams;
Proxypass http: // unix: /home/max/myproject/myproject.sock;
}
}
And my other file
/ etc / nginx / sites-available / myproject2
server {
listen 80;
servername 99.999.999.99 xxx.com www.xxx.com;
clientmaxbodysize 500M;
location = /favicon.ico { accesslog off; lognot_found off; }
location /static/ {
root /home/max/myproject;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/max/myproject/myproject.sock;
}
}
****************** My settings.py file ****************
ALLOWED_HOSTS = [‘xxx.cl’, ’www.xxx.cl’,’ xxx.com’, ’www.xxx.com’ , 'ip number’]
I enter with my domain.cl and everything works perfect
but When I enter with my domain.com, Then the browser sends me the following message “This site can’t be reached”
*****************/etc/systemd/system/gunicorn.service **************************
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=max
Group=max
WorkingDirectory=/home/max/myproject/myproject
ExecStart=/home/max/myproject/myprojectenv/bin/gunicorn –workers 3 -u max -g max –bind unix:/$
[Install]
WantedBy=multi-user.target
Help me, what can be wrong?
Do not delay in answering, if positive or negative.