Server & config generators

Apache Config Generator

Generate an Apache VirtualHost for a static/PHP site or reverse proxy, with HTTPS redirect, permissions and per-site logs. Free, in your browser.

Generate Apache config

Configure your VirtualHost. We build the Apache config.

Apache VirtualHost
<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    Redirect permanent / https://example.com/
</VirtualHost>

<VirtualHost *:443>
    ServerName example.com
    ServerAlias www.example.com
    SSLEngine on
    SSLCertificateFile      /etc/letsencrypt/live/example.com/fullchain.pem
    SSLCertificateKeyFile   /etc/letsencrypt/live/example.com/privkey.pem

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

    ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
    CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
</VirtualHost>
Save to /etc/apache2/sites-available/, enable with `a2ensite`, run `apachectl configtest`, then reload. Proxy mode needs mod_proxy; SSL needs mod_ssl.

What this Apache config generator does

Builds a complete VirtualHost
Static/PHP or reverse proxy modes
HTTPS with HTTP→HTTPS redirect
Sensible Directory permissions
Per-site error and access logs
Runs entirely in your browser

Common use cases

  1. 1Hosting a static or PHP site
  2. 2Proxying an app behind Apache
  3. 3Adding HTTPS with Let's Encrypt
  4. 4Setting up a new VirtualHost
  5. 5Standardising site configs
  6. 6Learning Apache syntax

Related tools

About Apache configuration

An Apache VirtualHost defines how a domain is served: its document root or backend, TLS, permissions and logs. A standard setup listens on 443 with a certificate and redirects port 80 to HTTPS.

This generator produces a clean VirtualHost for a static/PHP site or a reverse proxy. After saving it, enable the site with a2ensite and always run apachectl configtest before reloading. Proxy mode requires mod_proxy and HTTPS requires mod_ssl.

More Free Tools Where This Came From

This utility is one of dozens of free, no-login tools for DNS, email, SEO and developers — all instant and private.

HostCloud.in  ·  Pune, India  ·  Serving 34,987+ Websites Since 2020

FREQUENTLY ASKED QUESTIONS

Got Questions? We Have Answers.

What does it generate?

A complete VirtualHost for a static/PHP site or a reverse proxy, with an HTTP→HTTPS redirect, sensible Directory permissions, and per-site error and access logs.

How do I enable it?

Save it to /etc/apache2/sites-available/, enable with a2ensite, run apachectl configtest, then reload Apache.

What modules are required?

Reverse proxy mode needs mod_proxy; HTTPS needs mod_ssl.

Does it use AI or a server?

No. It builds the config in your browser.