Y
Y
Yeldos Adetbekov2016-09-06 20:16:12
Django
Yeldos Adetbekov, 2016-09-06 20:16:12

How to put two sites on DigitalOcean?

Hello. Created a project for one company on django (python). And placed it on DO. I used their own domain, but just added a sub-domain to it, and attached it to DO. So I'm working on the site itself (Which is on the main domain). That is, I completely re-create a site for them again in django. So the question is:
How can you put two or more projects with multiple sub-domain names on the same DO server?
Something inside tells you that you need to either rewrite the config in nginx so that there are some domains on 2 sites or in DO, but I didn’t get it. Please, help! I would be very grateful.
Before) (3rd.2nd.1st) -> DigitalOcean and (2nd.1st) -> Hosting
After) (3rd.2nd.1st + 2nd.1st) -> DigitalOcean

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Kitaev, 2016-09-06
@dosya97

server_name change in nginx config and that's it.
And, of course, hang gunicorn/uwsgi on different ports/sockets

Y
Yeldos Adetbekov, 2016-09-07
@dosya97

06391b7c186a463283db0250ac14dfb8
Do I need to create a new server{...} inside this config? But how to make the gunicorn listen to 2 ports?
59253b1d44f94963bf05ca9ce25abbbf.pngThank you! You always help me.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question