M
M
Mr.nobody2018-03-16 14:04:28
Django
Mr.nobody, 2018-03-16 14:04:28

How to install and configure a local web server for a Django site?

Hi all. Happy holiday! Since March 18! :))
I'm learning Python, Django.
I wanted to create my own website on the network, but sometimes it’s expensive, sometimes there are all sorts of restrictions.
In short, I decided to do everything locally, to practice. And then, as I fill my hand, there will be free money and I will put it on the combat server.
The computer is running Xubuntu 16.04.
I roughly understand this, you need to install a virtual Linux server, then a web server on it, and so on.
Explain in more detail how to implement this idea or click on the link where it is written.
Thank you.
PS I forgot to write, not just python manage.py runserver, but something like simulating a combat server on a local computer, so that you need to configure Nginx, uWSGI, SHH, etc., i.e. everything is like in real life, only on your computer.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
marataziat, 2018-03-16
@marataziat

In principle, if you need it not for production, then that's python3 manage.py runserverenough. Just open a NAT port on your computer and everyone can visit your site! But if you really want, do: nginx + gunicorn https://www.digitalocean.com/community/tutorials/h...
By the way, you can use https://ngrok.com/ instead of opening NAT!

S
sim3x, 2018-03-16
@sim3x

virtualbox
ubuntu server (17.X - to be ready for innovations in 18.04)
- figure out how to work with sssh keys
- how to run django devserver to show yourself from a virtual machine in a browser to an OS host
- how to install nginx from an nginx repository, configure static proxying, configure config
- figure out how to install uwsgi with pip and globally, differences and cons of each approach
- systemd - how to stop, start processes, read logs, write configs
- postgresql - default django subd, figure out how to work with psql

I will lay out free money on the combat server.
free
https://www.pythonanywhere.com/
https://www.heroku.com/python
AWS for 1 year gives free hosting services
There are also promotional codes for digitalocean and other clouds that give the amount to start for 1-2 months try

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question