W
W
wellnemo32019-11-28 23:18:19
Amazon Web Services
wellnemo3, 2019-11-28 23:18:19

How to run a project on the server in the domain?

How to run a project on the server in the domain?
I registered a free server on Amazon and it has its own domain
in it. I'm trying to run a python script that runs on a server on the local host
. How can I make a running script on the local host also appear on the domain?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan Shumov, 2019-11-28
@inoise

In order:
- there are no free servers in AWS, there are:

750 hours per month of Linux, RHEL, or SLES t2.micro instance usage
750 hours per month of Windows t2.micro instance usage

- You can attach a domain in different ways. If you don’t have it tied to Route53, then attach ElasticIP to EC2 (the easiest) and send DNS CNAME Record
to it, this is the base, and then you can dance indefinitely

V
Valery Vitalievich, 2019-11-29
@valera_91

What does displayed mean? - Worked on the server when entering the domain?
You want to combine the incompatible along the way. Transfer the script from LAN to the server and rejoice.

A
Alexander, 2019-11-29
@UPSA

Only the general direction ... and then, if I correctly understood the situation.
If there would be linux that direction:
1. Proxy mode. django nginx. nginx - as a proxy web server. django - acts as a backserver. nginx is a front server. When a request for "Your domain" comes in, nginx forwards the request to django where your script is executed that gives the information. But this is bad, because you need to keep track of django.
2. CGI mode. django gunicorn nginx. The python script works in cgi mode (usgi, wcgi). nginx , through the "shim" launches your application.
Found out that you have Windows. Further uncertainty, can you use IIS.
I think you should search with keywords: "Your webserver" python cgi. And configure the webserver to run cgi scripts. Then, when visiting the webserver page, it will call the python script.
But perhaps everything is simpler: run python manage.py runserver 0.0.0.0:80 and access the site.

W
wellnemo3, 2019-11-29
@wellnemo3

yes, it turned out, it was just necessary to specify the public IP address in the code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question