How To Deploy Django on Ubuntu 21.04 using Apache and MySQL
Learn how to deploy a Django powered web application live to the world using a Digital Ocean Virtual Private Server, Apache2, Django, And MySQL.
Please like, subscribe, and comment if you gained any value from this video! If you would like, you can support PFS on patreon as well!
Website: https://projectfullstack.com/
Github: https://github.com/ProjectFullStack/References/tree/master/Deploying_Django/ubuntu-21.04_Apache_Mysql
Patreon: https://www.patreon.com/projectfullstack
Resources:
Digital Ocean Link: https://m.do.co/c/e30460a6fcfc (referral link)
PuTTY: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
WSGI Config: https://modwsgi.readthedocs.io/en/develop/user-guides/quick-configuration-guide.html
0:00 Introduction
0:29 Step 1: Setup Server
6:39 Step 2: Connect To The Server
8:53 Step 3: Apply Software Updates
11:35 Step 4: Create Directory Structure
15:46 Step 5: Install PIP & Setup VirtualEnv
20:54 Step 6: Create Django project
25:22 Step 7: Install MySQL
29:56 Step 8: Connect MySQL and Django
37:12 Step 9: Install and Configure Apache
52:42 Step 10: Configuring Static Files
by Project Full Stack
linux http server
Step 1: Setup Server 0:29
Step 2: Connect To The Server: 6:39
Step 3: Apply Software Updates 8:53
Step 4: Create Directory Structure 11:35
Step 5: Install PIP & Setup VirtualEnv 15:46
Step 6: Create Django project 20:54
Step 7: Install MySQL 25:22
Step 8: Connect MySQL and Django 29:56
Step 9: Install and Configure Apache: 37:12
Step 10: Configuring Static Files 52:42
18:31 seems like the command doesn't exist anymore on ubuntu 22.04
Sir, I take my hat of for you. I am using Ubuntu 22.04.3 LTS, python 3.10.12, mysql 8.0.33, mysqlclient 2.0.3. I tried all kinds of tutorials but it wasn't until I stumbled across your youtube channel when I finally got traction and got it to work. My advice to anybody out there encountering issues: go back to the video, follow the instructions exactly and…. check your spelling..
48:09 dosent work. I see on my page "You don't have permission to access this resource." Im try to connect from another computer, not at the same. I use public IP and local, still dosent work.
Excellent tutorial!!!
I tried several forums guidelines to setup django with apache and always got stuck; your tutorial was great; I was able to complete the job. I only faced issues receiving 403/Forbidden right after 000-default.conf files is set; after trying several options, I used full path definitions inside this file and it worked. Great Job.
UnableUnable to stat Python home /root/deployment/venv. Python interpreter may not be able to be initialized correctly. Verify the supplied path and access permissions for whole of the path.
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
very cool, thank you.❤
the best django&apache video on the internet :fire:
if anyone encounter virtualenv not writeable problem "virtualenv: error: argument dest: the destination . is not write-able". just switch to root shell using "sudo bash" and then you can easily install virtualenv. btw thank you for such a content, wish people like you could get more attention you helped a lot to me today.
Sir, you are awesome! You save me. I was struggling to deploy it on AWS for the past 3 days and now I got your videos. Stay blessed sir.
Thank you so much for your sharing. You are my lifesaver
Thank you for this video.
really good tutorial, helped me much, thx
31:36 On Ubuntu, if you get an error on that stage, try installing build-essentials ("apt install build-essentials")
Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters
How can I fix it when sudo mysql_secure_installation
Can i get proper documentation of this video, please make a document, I need it really.
How to add HTML, CSS, JS files in Django Applications
Hi, this is very usefull and detailed video for me. I use virtual machine, ubuntu 20.04, last apache, but when i added WSGIDeamonProcess to apache's site_avaliable configuration file, then apache couldn't start because error "WSGIDeamonProcess misspelled or not included into apache configuration". I stuck for 5 days with apache+mod_wsgi, but nginx+gunicorn+django could install during 1 hour and it works. Can you check if your instruction still actual and if it's not change your pdf file ? It will be helpfull for those who, new in linux.
I have You don't have permission to access this resource.. And what should I do ?
Dude, this tutorial and the out dated one help me and my project team out sooooooo much. It really helped us to just get the setup done and out of the way. I'm just curious if you could host the Django server on a different device and have apache call to it whenever and receive responses like that.