$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">update
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install nginx -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install nginx -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install nginx -y
$ nginx -version
$ nginx -version
$ nginx -version
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">enable nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">start nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">status nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">stop nginx
$ -weight: 600;">sudo -weight: 500;">systemctl -weight: 500;">restart nginx
$ -weight: 600;">sudo ufw allow 80/tcp
$ -weight: 600;">sudo ufw allow 443/tcp
$ -weight: 600;">sudo ufw allow 80/tcp
$ -weight: 600;">sudo ufw allow 443/tcp
$ -weight: 600;">sudo ufw allow 80/tcp
$ -weight: 600;">sudo ufw allow 443/tcp
$ -weight: 600;">sudo mkdir -p /var/www/app.example.com
$ -weight: 600;">sudo chown -R www-data:www-data /var/www/app.example.com
$ -weight: 600;">sudo mkdir -p /var/www/app.example.com
$ -weight: 600;">sudo chown -R www-data:www-data /var/www/app.example.com
$ -weight: 600;">sudo mkdir -p /var/www/app.example.com
$ -weight: 600;">sudo chown -R www-data:www-data /var/www/app.example.com
$ -weight: 600;">sudo nano /var/www/app.example.com/index.html
$ -weight: 600;">sudo nano /var/www/app.example.com/index.html
$ -weight: 600;">sudo nano /var/www/app.example.com/index.html
<!DOCTYPE html>
<html>
<head><title>My App</title></head>
<body><h1>Hello World from Nginx on Ubuntu 26.04</h1></body>
</html>
<!DOCTYPE html>
<html>
<head><title>My App</title></head>
<body><h1>Hello World from Nginx on Ubuntu 26.04</h1></body>
</html>
<!DOCTYPE html>
<html>
<head><title>My App</title></head>
<body><h1>Hello World from Nginx on Ubuntu 26.04</h1></body>
</html>
$ -weight: 600;">sudo nano /etc/nginx/sites-available/app.example.com.conf
$ -weight: 600;">sudo nano /etc/nginx/sites-available/app.example.com.conf
$ -weight: 600;">sudo nano /etc/nginx/sites-available/app.example.com.conf
server { listen 80; server_name app.example.com; root /var/www/app.example.com; index index.html; location / { try_files $uri $uri/ =404; } access_log /var/log/nginx/app.example.com-access.log; error_log /var/log/nginx/app.example.com-error.log;
}
server { listen 80; server_name app.example.com; root /var/www/app.example.com; index index.html; location / { try_files $uri $uri/ =404; } access_log /var/log/nginx/app.example.com-access.log; error_log /var/log/nginx/app.example.com-error.log;
}
server { listen 80; server_name app.example.com; root /var/www/app.example.com; index index.html; location / { try_files $uri $uri/ =404; } access_log /var/log/nginx/app.example.com-access.log; error_log /var/log/nginx/app.example.com-error.log;
}
$ -weight: 600;">sudo ln -s /etc/nginx/sites-available/app.example.com.conf /etc/nginx/sites-enabled/
$ -weight: 600;">sudo nginx -t
$ -weight: 600;">sudo -weight: 500;">systemctl reload nginx
$ -weight: 600;">sudo ln -s /etc/nginx/sites-available/app.example.com.conf /etc/nginx/sites-enabled/
$ -weight: 600;">sudo nginx -t
$ -weight: 600;">sudo -weight: 500;">systemctl reload nginx
$ -weight: 600;">sudo ln -s /etc/nginx/sites-available/app.example.com.conf /etc/nginx/sites-enabled/
$ -weight: 600;">sudo nginx -t
$ -weight: 600;">sudo -weight: 500;">systemctl reload nginx
$ -weight: 500;">curl http://app.example.com
$ -weight: 500;">curl http://app.example.com
$ -weight: 500;">curl http://app.example.com
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-nginx -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-nginx -y
$ -weight: 600;">sudo -weight: 500;">apt -weight: 500;">install certbot python3-certbot-nginx -y
$ -weight: 600;">sudo certbot --nginx -d app.example.com --agree-tos
$ -weight: 600;">sudo certbot --nginx -d app.example.com --agree-tos
$ -weight: 600;">sudo certbot --nginx -d app.example.com --agree-tos
$ -weight: 600;">sudo certbot renew --dry-run
$ -weight: 600;">sudo certbot renew --dry-run
$ -weight: 600;">sudo certbot renew --dry-run - Add PHP via PHP-FPM to serve dynamic content alongside Nginx
- Configure Nginx as a reverse proxy in front of a Node.js or Python application
- Enable HTTP/2 support by adding http2 to the listen directive