Question

Two domains into one ip, what can i do ?

Someone knows how to do to address two different domains to a single ip. I was trying on the panel, but I got confused a bit and I did not succeed, I only managed to access a single domain.

What I want is that “mydomain.cl” and “maydomain.com” come to my same application.

Well I hope some clue. Thank you


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

ENTER OTHER DNS TO YOUR NEW DOMAIN AND SEE BLOCKSERVER NGINX EASY TAKE 5 MINUTE

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@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;      Server_name 99.999.999.99 xxx.cl www.xxx.cl;      500M client_max_body_size;      Location = /favicon.ico {access_log off; Log_not_found off; }      Location / static / {          Root / home / max / myproject;      }

Location / {          Include proxy_params;          Proxy_pass http: // unix: /home/max/myproject/myproject.sock;      } }

And my other file

/ etc / nginx / sites-available / myproject2

server { listen 80; server_name 99.999.999.99 xxx.com www.xxx.com; client_max_body_size 500M; location = /favicon.ico { access_log off; log_not_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.

@benrebia

Thanks, you’re right, I’ll do the tutorial steps, as you suggest. And I’ll let you know the result.