Thinhnam.net Configuration Apr 2026
sudo apt install postfix dovecot-core dovecot-imapd dovecot-pop3d
<Directory /var/www/thinhnam.net/html> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory>
| Record Type | Name/Host | Value/Target | TTL (Recommended) | |-------------|-----------|--------------|-------------------| | | @ (root) | YOUR_SERVER_IPv4 | 300-3600 | | AAAA | @ (root) | YOUR_SERVER_IPv6 (if available) | 300-3600 | | A | www | YOUR_SERVER_IPv4 | 300-3600 | | CNAME | * (wildcard, optional) | thinhnam.net | 3600 | | TXT | @ | v=spf1 mx ~all (basic SPF) | 3600 | | TXT | _dmarc | v=DMARC1; p=none; rua=mailto:dmarc@thinhnam.net | 3600 |
SSLEngine on SSLCertificateFile /etc/ssl/certs/thinhnam.net/fullchain.pem SSLCertificateKeyFile /etc/ssl/private/thinhnam.net/privkey.pem Thinhnam.net Configuration
# Root directory root /var/www/thinhnam.net/html; index index.html index.php;
sudo apt install certbot python3-certbot-nginx # for Nginx # or sudo apt install certbot python3-certbot-apache # for Apache sudo certbot --nginx -d thinhnam.net -d www.thinhnam.net
server listen 80; listen [::]:80; server_name thinhnam.net www.thinhnam.net; return 301 https://$server_name$request_uri; index index.html index.php
<VirtualHost *:80> ServerName thinhnam.net ServerAlias www.thinhnam.net Redirect permanent / https://thinhnam.net/ </VirtualHost> <VirtualHost *:443> ServerName thinhnam.net ServerAlias www.thinhnam.net DocumentRoot /var/www/thinhnam.net/html
# PHP-FPM (if using PHP) location ~ \.php$ include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
server listen 443 ssl http2; listen [::]:443 ssl http2; server_name thinhnam.net www.thinhnam.net; server_name thinhnam.net www.thinhnam.net
# Deny hidden files location ~ /\. deny all;
# SSL (see Section 4) ssl_certificate /etc/ssl/certs/thinhnam.net/fullchain.pem; ssl_certificate_key /etc/ssl/private/thinhnam.net/privkey.pem;
ln -s /etc/nginx/sites-available/thinhnam.net /etc/nginx/sites-enabled/ nginx -t && systemctl reload nginx Create /etc/apache2/sites-available/thinhnam.net.conf