Apache VHost Templates
Customize your Apache configuration
VHost Templates
Customize your Apache configuration with per-project templates.
How Templates Work
- Each project can have its own custom VHost template
- Templates are stored per project name (not hostname)
- Templates survive hostname changes
- Use Jinja2 syntax for variables like
{{ hostname }}
Available Variables
{{ hostname }}- Primary domain name{{ document_root }}- Web root directory{{ project_path }}- Full project path{{ server_aliases }}- Additional domains{{ php_fpm_socket }}- PHP-FPM socket path
Editing Templates
- Click "Edit VHost Template" on your project
- Modify the Apache configuration
- Click Save
- Click "Create VHost" or "Setup SSL" to apply
Common Customizations
- Adding custom redirects
- Setting environment variables
- Configuring proxy rules
- Adding security headers
- Custom error pages
Template Inheritance
Templates are applied in this order:
- Base template (HTTP or HTTPS)
- Project-specific customizations
- SSL configuration (if enabled)
Reset to Default
If you want to get the latest default template with new features, click "Reset to Default" in the Edit Template modal. Your customizations will be lost!
Syntax Validation
Before applying, the system runs Apache configtest to validate your configuration. If there's an error, you'll see the message and the change won't be applied.