Deploy Django Web App With SSL to VPS with Nginx & Gunicorn | Full Tutorial 2024

  Рет қаралды 8,632

THE PROTON GUY

THE PROTON GUY

Күн бұрын

Пікірлер: 38
@gustavoribeiro1526
@gustavoribeiro1526 Ай бұрын
Thank you for this lesson. Everything worked out well here.
@the_proton_guy
@the_proton_guy Ай бұрын
You are welcome! 🙏🏿
@caiopjv
@caiopjv 3 ай бұрын
Great video! Thanks a lot. I will try these steps today!
@the_proton_guy
@the_proton_guy 3 ай бұрын
You’re welcome!
@HakiYikio
@HakiYikio 9 ай бұрын
Same as above, i can finally access my own website with my domain name, thank you :)
@the_proton_guy
@the_proton_guy 9 ай бұрын
You are welcome 🎉
@MrTR909
@MrTR909 3 ай бұрын
I can access my server but once i going to log in, error 403 forbidden.
@the_proton_guy
@the_proton_guy 3 ай бұрын
Okay, you get 403 on the web page? You can access your website from the io address yeah?
@HatibuJulius
@HatibuJulius 8 ай бұрын
sir is using supervisor necessary?
@the_proton_guy
@the_proton_guy 8 ай бұрын
Yes
@Kevelino-02
@Kevelino-02 4 ай бұрын
​@@the_proton_guy He talk about supervisor not `super user`
@RuslanKhotsenko
@RuslanKhotsenko 2 ай бұрын
Hello! Thank you very much for this great video! I did everything like in the video except of installing SSL. I stuck on ERR_TOO_MANY_REDIRECTS error when I type my domain without pointing a port 8000. If I write down domain name : 8000 everything works correct. Where is my error?
@the_proton_guy
@the_proton_guy 2 ай бұрын
Make sure you nginx file is properly setup as in the tutorial, also make sure that your gunicorn command correct: gunicorn -bind 0.0.0.0:8000 ProjectName.wsgi
@johncampilla4146
@johncampilla4146 7 ай бұрын
Thank you for your video! Let me inform you of how i set up my ubuntu, i created a VM in virtual box and acquired the IP address in network settings of virtual box. I followed the instructions that you provided, however in step 4 when creating the virutal environment, i encountered an error message saying "virtualenv: error: argument dest: the destination . is not write-able at /opt". Can you enlighten me on how to solve the issue? Thank you for you prompt response.
@the_proton_guy
@the_proton_guy 7 ай бұрын
So sorry for replying late. The error probably means you don’t have permission to write to that specific directory. Try the following: 1. First, verify the permissions of the directory where you're trying to create the virtual environment. You can use the ls -ld /opt command to check the permissions of the /opt directory. Ensure that the current user has write permissions to this directory. 2. Use sudo: If you need to create the virtual environment in a directory that requires elevated permissions, you can use sudo: sudo virtualenv /opt/myenv 3. Adjust Permissions: If you have access to the /opt directory and need to create the virtual environment there, you can adjust the permissions of the directory to allow your user to write to it. You can use the chmod command to modify the permissions: sudo chmod u+w /opt I hope this helps!
@johncampilla4146
@johncampilla4146 7 ай бұрын
@the_proton_guy, thank you so much. I executed 'sudo chmod u+w /opt' and managed to make progress by creating the virtual environment with the necessary permissions in the '/opt/myproject/' directory. However, at step 5, after successfully entering 'cd /opt/myproject', I ran into an error when trying to execute 'mkdir myproject'. The error message 'mkdir: cannot create directory ‘myproject’: Permission denied' was displayed. It appears there may be an issue with my user credentials since I do not have root access. I apologize for any inconvenience caused by this simple issue, as I am relatively new to LINUX/UBUNTU. I aim to deploy my Django project and test it as if it were a VPS within a virtual machine. Is it feasible to use my VM as a web server, accessible via its IP address and over the internet, solely for testing purposes? Thank you for your assistance; it has helped me understand the issues with Linux, Ubuntu, Nginx, and Gunicorn.
@johncampilla4146
@johncampilla4146 7 ай бұрын
Please let me know if this will be effective, or I will stop setting up the VM. Thank you.
@the_proton_guy
@the_proton_guy 7 ай бұрын
No need to apologize! Linux permissions can be tricky, especially if you're new to working with them. Let's address your questions and concerns one by one: 1. Permission Denied Error: The error you encountered when trying to create the myproject directory with mkdir indicates that your user does not have the necessary permissions to write to the /opt/myproject directory. Since you used sudo to grant write permissions to the /opt directory, you may also need to use sudo to create the myproject directory: sudo mkdir /opt/myproject This command should create the directory without any permission errors. After creating the directory, you may also need to adjust its permissions so that your user has full access to it: sudo chown -R $USER:$USER /opt/myproject This command changes the ownership of the /opt/myproject directory and all its contents to your user, allowing you to write to it without sudo. 2. Using VM as a Web Server for Testing: Yes, it is feasible to use your VM as a web server for testing purposes. Virtual machines are commonly used for development and testing environments, allowing you to simulate a production environment without affecting your local machine. You can deploy your Django project on the VM, configure Nginx and Gunicorn to serve the application, and access it via its IP address over the internet.However, keep in mind that publicly exposing a server to the internet comes with security considerations. Ensure that you properly secure your VM, apply updates regularly, and follow best practices for web server configuration and application deployment. If you need any further assistance, feel free to join my discord server where i am trying to create a community for sharing knowledge and asking questions: discord.com/invite/hhqtG4jp
@johncampilla4146
@johncampilla4146 7 ай бұрын
@@the_proton_guy Thank you so much for your assistance, will try later and yes I will join.
@hendahmed5842
@hendahmed5842 2 ай бұрын
Bro, please reply I successfully receive the deployment certificate that implies that my website is secure but it is still not secure when I reload Second thing is, why the domain don't work without me running the gunicorn --bind command, Isn't it supposed to work just when you click on it??
@the_proton_guy
@the_proton_guy 2 ай бұрын
Well, you have to run the gunicorn command to run your Django project. Without it, it’s better to run your project with gunicorn in production. Also are you sure your nginx file was setup properly? And did you remember to restart it
@marcofourie5548
@marcofourie5548 5 ай бұрын
Would this tutorial still work if you don't have a domain just the IP of the VPS? I am struggling to deploy my project!
@the_proton_guy
@the_proton_guy 5 ай бұрын
Yeah it will. I broke it down into parts. In the first part, I showed how to deploy to the VPs and access it through the ip address of server. In the second part, I showed how to connect a domain
@marcofourie5548
@marcofourie5548 5 ай бұрын
@@the_proton_guy I already tried to deploy but i want to follow your tutorial. Can install whitenoise in the server terminal on PuTTY and then continue like that?
@the_proton_guy
@the_proton_guy 5 ай бұрын
Yes you can.
@callofgame2787
@callofgame2787 3 ай бұрын
@@the_proton_guy Hi, I followed your instructions and do it 1:1 but once I have set up my domain settings on provider website I can’t access the same files as I can access with typed ip address with port number. I got Nginx welcome page instead of my website when I use domain name :/
@the_proton_guy
@the_proton_guy 3 ай бұрын
@callofgame2787 hello! Are you sure you configured nginx properly? Text me on Instagram at the_proton_guy
@suryabisht00
@suryabisht00 6 ай бұрын
website is not loading in local browser using server's ip
@the_proton_guy
@the_proton_guy 6 ай бұрын
Check the server logs for errors. What do you see?
@suryabisht00
@suryabisht00 6 ай бұрын
@@the_proton_guy where do I see the server log ?
@the_proton_guy
@the_proton_guy 6 ай бұрын
@suryabisht00 check your terminal where your server is running
Deploy a Django Web App to Amazon EC2 Instance  | 2024
16:26
THE PROTON GUY
Рет қаралды 16 М.
Deploying Django with Gunicorn & Nginx: Step-by-Step Tutorial! 🔥
17:40
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Docker | Towards serving React (Nginx) with Django API (gunicorn)
48:35
Deploy a Django web app on Amazon EC2
21:47
Cloud With Django
Рет қаралды 103 М.
Create A Complete ETL Test Suite with DBT-Tests
55:23
Technovation
Рет қаралды 64
Setting up a production ready VPS is a lot easier than I thought.
29:50
Deploy Django Project & Postgresql Database to Render for Free | 2024
31:49
Deploy a Django web app with Nginx to Amazon EC2
35:26
Cloud With Django
Рет қаралды 46 М.
How to Deploy a Django App and Postgres Database to Render
20:14
Pretty Printed
Рет қаралды 40 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН