RubanTools

Server Config Generator

Generate Nginx server blocks or Apache .htaccess rules - redirects, CORS, security headers, caching, PHP apps.

Configuration

Optional Features
nginx.conf

Server Config FAQ

Nginx handles high concurrency efficiently using an event-driven architecture, making it ideal for high-traffic sites, reverse proxies, and static file serving. Apache uses a process/thread model that works well for PHP applications and supports .htaccess files for per-directory config. Nginx is generally faster for static content; Apache is more flexible for shared hosting. Many setups use Nginx as a front-end proxy with Apache or PHP-FPM handling dynamic requests.

For Nginx, save to /etc/nginx/sites-available/yourdomain.com then symlink it: ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/. Run nginx -t to test and systemctl reload nginx to apply. For Apache, the .htaccess file goes in your document root. Make sure AllowOverride All is set in your Apache virtual host and mod_rewrite is enabled (a2enmod rewrite).

Use Let's Encrypt via Certbot - it's free and auto-renewing. Install: apt install certbot python3-certbot-nginx, then run certbot --nginx -d yourdomain.com. Certbot will modify your Nginx config automatically and set up a cron job to auto-renew. For Apache use certbot --apache. Certificates are valid for 90 days and renewed automatically before expiry.