Hosting Django application in AWS cloud with NGINX web server and Gunicorn WSGI Server.

preview_player
Показать описание
Here we are going to learn how to deploy Django application in AWS cloud. We are using NGINX as web server and Gunicorn as WSGI Interface between NGINX and Django. We are hosting django application in Ubuntu Linux VM (EC2 instance) in amazon web service.

To deploy, we have already created a django application. The source code for the same is provided in github.

Youtube tutorial :

Github code :



In this tutorial we are performing below steps to deploy python django application to aws cloud:
1. Login to aws console.
2. Launch a server instance in aws . We launch a ubuntu instance
3. SSH to remote server in aws cloud. IF you are using widows use tool like PuTTy or gitbash terminal to ssh to aws server instances.
4. Install NGINX server in Ubuntu and starting it.
5. Security Setting in aws to allow traffic to nginx server
6. Install PIP (python package manager). Use the command "sudo apt install python3-pip" to install pip in linux VM.
7. Install virtualenv. Use the command "sudo apt install python3-virtualenv" to install virtual env in linux vm.
6. Create vitualenv . To Create virtualenv use command "virtualenv venv". venv is the folder name
7. Clone Django project source code from git repository.
8. Install required packages in virtualenv.
9. Install Gunicorn server.
10. Starting Gunicorn server.
11. Configure nginx to connect to Gunicorn

Thank for reading. If you find the useful please subscribe my channel and share with others who likes this.
Рекомендации по теме
Комментарии
Автор

Nice Explanation! Great! Thanks for sharing

Khalidnaas
Автор

Never expected to find a good video like this. Thanks for your help!

dhkang
Автор

Nice tutorial that explain each step of deployment of python Django project in aws. I could deploy project in aws. Thanks 👍

deepakvasudevan
Автор

It is worthy to spent my time to watch this video.Thank you sir.

agnelrayan
Автор

Thank you for step by step and detail introduction!

vitali
Автор

Easy and simple steps, each step works perfectly. Well explained concepts. Successfully followed and implemented all the steps 😊. Thank you for the awesome video.

ashishdiwakar
Автор

This is a very helpful video. Very helpful.

taiwoadebisi
Автор

Django admin panel css Is not working with nginx...Do you have an idea about the issue??

vikhyatverma
Автор

Help me what I can do if we have multiple django applications in one server and need to do nginx and gunicorn

manifz
Автор

Great video, easy to follow... please help me on below issue

kaleshcv
Автор

What do I have to do to use the /admin ? when I try to login I get a 502 bad gateway

TheMrGreenMoney
Автор

Hello sir, I hv deployed a django application in aws using the t2.micro free tire instance.. Everything working fine except the images.. what would be the problem ? Please help..

kaleshcv
Автор

I cannot see the information of my endpoints, what could it be? Did you do any database migration or something?

TheMrGreenMoney
Автор

Thank you very much sir for providing this video, this was very helpful content for us, all the things have gone very nice till last, Sir will you please tell me why static files are not loading at the end of the process.

travelwithmightymocha
Автор

After this way of deployment, i got an OS error 5.
i gave the permission for read write.
After that the error went for some time. Again it is showing the same.
Can you tell me how to solve this issue. Is this issue is related to the WSGI connection?

vaishnaviks
Автор

Sir i am not able to resolve Exception Work Process error even after removing /
please help !!

kashishpandita
Автор

Hi,
I am using azure ubuntu vm Linux (ubuntu 18.04), i have installed python3, when doing python3 --version it is showing 3.6.9 but when python --version it it showing 2.7.



Python 3.6.9
Cloning into 'djangorestapi'...
remote: Enumerating objects: 34, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 34 (delta 6), reused 24 (delta 3), pack-reused 0
Unpacking objects: 100% (34/34), done.
ERROR: Could not find a version that satisfies the requirement asgiref==3.2.7 (from -r (line 1)) (from versions: 0.8, 0.9, 0 .9.1, 0.10.0, 0.11.0, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.13.0, 0.13.2, 0.13.3, 0.14.0, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 3.0.0, 3.1.0, 3.1.1, 3 .1.2, 3.1.3, 3.1.4, 3.2.0, 3.2.1, 3.2.2, 3.2.3)
ERROR: No matching distribution found for asgiref==3.2.7 (from -r /djangoresta pi/requirements.txt (line 1))

and getting this error .

kindly suggest me .

bijayajena
Автор

thank you and i have a question. when i install ubuntu, there is python version of 3.8. but in my computer, python is 3.7. how can I downgrade the python 3.8 in ubuntu to python 3.7 ? is it possible?

programmingwithshin
Автор

At 10:36 how did you go back to the command line from the nginx default file>?

TheOnkard