Aajonus.net - Static Markdown Website
Features
- 📝 Markdown Support - Write content in Markdown (.md) or plain text (.txt)
- 🔍 Full-text Search - Client-side search with highlighting
- 📁 Category Management - Automatic category detection from folder structure
- 🎯 SEO Optimized - Meta tags, canonical URLs, Open Graph, Twitter Cards
- ⚡ Performance - HTTP/2, Brotli compression, PHP-FPM
- 📱 Responsive - Mobile-friendly design
- 🔗 Clean URLs -
.htaccessrewrite rules for pretty URLs
Server Setup
Configure Apache for .htaccess
Edit /etc/apache2/apache2.conf:
Find the <Directory /var/www/> section and change:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All # Change from None to All
Require all granted
</Directory>
Enable required Apache modules:
sudo a2enmod rewrite headers expires
sudo systemctl reload apache2
Deploy Your Website
- Clone or upload your files to
/var/www/html/ - Upload your Markdown content to
/var/www/html/texts/ - Set proper permissions:
sudo chown -R www-data:www-data /var/www/html/
sudo find /var/www/html/ -type f -exec chmod 644 {} \;
sudo find /var/www/html/ -type d -exec chmod 755 {} \;
Enable HTTPS (Required for HTTP/2 and Brotli)
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d yourdomain.com -d www.yourdomain.com
sudo systemctl restart apache2
After SSL is configured, uncomment the HTTPS redirect rules in your .htaccess.
Performance Optimization (Optional)
Install PHP-FPM & Enable HTTP/2
PHP-FPM provides better performance than mod_php:
# Install PHP-FPM with required extensions
sudo apt install php8.3-fpm php8.3-xml php8.3-mbstring -y
sudo systemctl enable --now php8.3-fpm
# Switch from mod_php to PHP-FPM
sudo a2dismod php8.3
sudo a2enmod proxy_fcgi
sudo a2enconf php8.3-fpm
# Enable HTTP/2 (requires HTTPS)
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event
sudo a2enmod http2
sudo systemctl restart apache2
Increase PHP-FPM Workers
Edit /etc/php/8.3/fpm/pool.d/www.conf:
pm.max_children = 25
Apply changes:
sudo systemctl restart php8.3-fpm
Enable Brotli Compression
sudo apt install libapache2-mod-brotli -y
sudo a2enmod brotli
sudo systemctl restart apache2
Security & Server Hardening
Limit Journal Log Size
Edit /etc/systemd/journald.conf:
Uncomment and set:
SystemMaxUse=200M
Apply changes:
sudo systemctl restart systemd-journald
Install Fail2ban (Prevent Brute Force)
sudo apt install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
Hide Apache Version
Edit /etc/apache2/conf-available/security.conf:
ServerSignature Off
ServerTokens Prod
Apply changes:
sudo systemctl restart apache2