DeveloperBreeze

Server Administration Programming Tutorials, Guides & Best Practices

Explore 48+ expertly crafted server administration tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

Tutorial
bash

How to Install and Configure Apache on Ubuntu

sudo apt update

To install Apache on your server, use the following command:

Oct 21, 2024
Read More
Tutorial
bash

How to Create SSL for a Website on Ubuntu

Add the following lines under your server block to enhance security:

ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384";
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:10m;
ssl_stapling on;
ssl_stapling_verify on;

Oct 21, 2024
Read More
Tutorial

Adding a Subdomain on an Apache Server

   sudo nano /etc/apache2/sites-available/blog.example.com.conf
   <VirtualHost *:80>
       ServerAdmin admin@example.com
       ServerName blog.example.com
       DocumentRoot /var/www/blog.example.com

       <Directory /var/www/blog.example.com>
           Options Indexes FollowSymLinks
           AllowOverride All
           Require all granted
       </Directory>

       ErrorLog ${APACHE_LOG_DIR}/blog.example.com-error.log
       CustomLog ${APACHE_LOG_DIR}/blog.example.com-access.log combined
   </VirtualHost>

Aug 21, 2024
Read More
Tutorial
python bash

Deploying a Flask Application on a VPS Using Gunicorn and Nginx

# HTTP to HTTPS redirection
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name developerbreeze.com www.developerbreeze.com;

    return 301 https://developerbreeze.com$request_uri;
}

# HTTPS Server Block
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name developerbreeze.com www.developerbreeze.com;

    ssl_certificate /etc/letsencrypt/live/developerbreeze.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/developerbreeze.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    root /path/to/your-flask-app;
    index index.html;

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    location / {
        include proxy_params;
        proxy_pass http://unix:/path/to/your-flask-app/developerbreeze.sock;
    }

    location /static {
        alias /path/to/your-flask-app/static;
    }

    location /favicon.ico {
        alias /path/to/your-flask-app/static/favicon.ico;
    }

    location ~ /.well-known {
        allow all;
    }
}
sudo ln -s /etc/nginx/sites-available/developerbreeze /etc/nginx/sites-enabled/
sudo rm /etc/nginx/sites-enabled/default

Aug 03, 2024
Read More