Apache Config Generator
Build an Apache 2.4 VirtualHost — ServerName, DocumentRoot, Directory, aliases, and optional SSL.
VirtualHost
site.conf
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example
<Directory /var/www/example>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Examples
HTTP site
ServerName example.com, DocumentRoot /var/www/example, Directory with AllowOverride All<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/example
<Directory /var/www/example>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>A basic HTTP vhost that allows .htaccess overrides.
About this tool
The Apache Config Generator writes an Apache 2.4 VirtualHost block. Set the ServerName and optional alias, the DocumentRoot, and the port; add a Directory block, aliases, and SSL when needed. The output uses modern Require all granted access control — nothing is uploaded.
How to use
Set the host
Enter the ServerName and an alias, plus the DocumentRoot.
Add Directory or SSL
Include a Directory block for options, and toggle SSL for port 443 with cert paths.
Enable the site
Save under sites-available and run a2ensite, then reload Apache.
Use cases
New virtual host
Stand up a config for a new domain.
HTTPS migration
Add an SSL vhost on 443 alongside the HTTP one.
Common mistakes
Mistake:Using 2.2 Allow/Deny syntax.
Fix:Apache 2.4 uses Require all granted — the builder emits the modern form.
Frequently asked questions
Related guides
Getting the Most Out of .htaccess
The directives that matter in an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth.
Setting Up an Apache VirtualHost
The pieces of an Apache 2.4 VirtualHost — ServerName, DocumentRoot, Directory, aliases, and SSL — and how to enable it.
References & standards
Related tools
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML
CHANGELOG Generator
Write a clean, consistent CHANGELOG entry in the Keep a Changelog format from grouped Added, Changed, Deprecated, Removed, Fixed, and Security notes
Chmod Calculator
Calculate Linux file permissions (777, 755 etc) easily.
CircleCI Config Generator
Generate a .circleci/config.yml — jobs with Docker images and run steps wired into a workflow
Cron Expression Builder
Build and validate cron expressions with visual interface and presets