/
👌
Upgrade Ubuntu’s Nginx
Search
Duplicate
Try Notion
👌
Upgrade Ubuntu’s Nginx
Verify Nginx current version
$ nginx -v # nginx version: nginx/1.18.0 (Ubuntu)
Bash
Backup your config
sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup
Bash
Requirements
Edit /etc/apt/sources.list and using your ubuntu release version (jammy in my case) append the next 2 lines.
deb https://nginx.org/packages/ubuntu/ jammy nginx deb-src https://nginx.org/packages/ubuntu/ jammy nginx
Bash
Install Nginx:
sudo apt update # This will fail and return a key id sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key_id sudo apt update sudo apt install nginx
Bash