By max gonzalez
And now I have the following situation,
First I do not see any errors, because the commands “sudo nginx -t” and “python3 manage.py runserver localhost: 9000” run well for me and now while running this last command I can access my application that is hosted in “django_project” without No change using the django_project skeleton and just re-editing the necessary “.py” as urls.py, views.py and add the “html” files of my application. EVERYTHING ALRIGHT HERE. If I give “Control-C”, then I can not access my application and send me the error bad 502, but I think this is the right thing, because I am accessing through the test server.
But according to the documentation I made several changes in nginx and gunicorn, which do not produce any effect, because when access by the name of my domain “www.xxxxxxxxxxx.cxx” I continue releasing the page html index.html that is hosted in var / www /xxxxxxxxxxxxxxxxx.cxx / html and is not redirected to my application.
As I mentioned, I followed all the steps of the documentation sent to me.
Please, to achieve success with this, you can give me some additional recommendation. ? To make and work
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!
Hi @maxgonpe
If I’m understanding you correctly, when you run your project directly with python3 manage.py runserver localhost:9000, you’re able to see your site through Nginx?
You need to setup your project through Gunicorn, so that will keep your project running in the background. Then you do the reverse proxy from Nginx to Gunicorn.
Which tutorial have you been following?
Thanks for your interest in helping me, well among so many things I have tried, I lean for these three as the most successful:
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean
https://www.digitalocean.com/community/tutorials/how-to-use-the-django-one-click-install-image
In all the tutorials I have reviewed, do not let me clear the union between what I am doing in my python directory and what is published. good. I hope you give me some way to go. Thanks in advance
Hi @maxgonpe
Remember to either use the Reply-link or use the @ to notify others - otherwise it’s easy to overlook new comments.
Are you using the Django one-click-app? If yes, then your default path is /home/django/django_project
If not, what/how did you install the server?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.