Apache Virtual Host Generator (HTTPS, Redirect, Proxy)

Get a secure starting vhost for Apache 2.4 with the modules you need listed.

Use the tool

Why this tool exists

Enter the server name, aliases, whether to serve static files or proxy to an app, certificate paths and the document root or proxy target. The output has a port 80 host that redirects to HTTPS, a port 443 host with TLS 1.2 and 1.3 only, HSTS and other security headers, deflate compression and per-site logs. For proxies it sets X-Forwarded-Proto and ProxyPreserveHost.

Enable the listed modules (ssl, rewrite, headers, deflate, proxy, proxy_http) and run apachectl configtest before reloading. Adjust cipher policy and HSTS for your environment.

No data is sent anywhere: the work happens in your browser, so you can use it offline once the page has loaded.

How to use it

  1. Enter the domain and choose static or proxy.
  2. Set the certificate and key paths.
  3. Save to sites-available and enable with a2ensite.
  4. Run apachectl configtest and reload.

Frequently asked questions

What does HSTS do?

It tells browsers to use HTTPS for the domain; enable it only when HTTPS works everywhere.

Do I need mod_proxy?

Only for reverse proxy mode.

Where do Let's Encrypt certificates live?

Usually under /etc/letsencrypt/live/DOMAIN/.

Is my data sent anywhere?

No. Everything is processed in your browser, and the page makes no network requests with your input.