linux_web_server_config_generator
Generates Apache 2.4, nginx, and Caddy 2 configuration files from a single structured input, including TLS, reverse proxy, PHP-FPM, static file serving, security headers, and logging.
Instructions
Apache / Nginx / Caddy Web Server Config Generator. Build ready-to-deploy web server configuration text for Apache 2.4, nginx, and Caddy 2 from one structured input. A single request returns all three parallel outputs (Apache VirtualHost, nginx server block, Caddyfile) covering TLS with optional HTTP-to-HTTPS redirect and HSTS, reverse proxy with WebSocket upgrade, PHP-FPM FastCGI dispatch, static-file serving with cache expiry, gzip, security headers, custom error pages, and access/error logging. It only BUILDS config text from your parameters; it never writes files to disk, edits a live server, reloads, or restarts anything. Use this for full virtual-host or server-block files; use linux_htaccess_generator for an Apache per-directory .htaccess instead, or linux_ssh_config_generator for SSH client/daemon config. Set operation to generate (the default, requires serverName) or to presets to list curated starter configurations. Runs locally on the values you provide, read-only and non-destructive, contacts no e
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | Mode: generate builds the config text (requires serverName); presets returns the curated starter list and ignores all other fields. | generate |
| serverName | No | Primary hostname for the virtual host or server block (for example example.com). Required when operation is generate; max 253 chars; underscore is accepted as the nginx default-server placeholder. | |
| serverAliases | No | Extra hostnames (ServerAlias / additional server_name entries). Blank entries are dropped. | |
| httpPort | No | Plain-HTTP listen port. | |
| httpsPort | No | HTTPS listen port (used only when ssl.enabled is true). | |
| documentRoot | No | Filesystem path served as the web root (DocumentRoot / root). | /var/www/html |
| gzip | No | Emit gzip / compression directives for text responses. | |
| ssl | No | TLS settings. | |
| reverseProxy | No | Reverse-proxy / upstream settings. | |
| php | No | PHP-FPM FastCGI settings. | |
| static | No | Static-file serving settings. | |
| security | No | Security-header and server-token settings. | |
| errorPages | No | Map of HTTP status code (as key) to a custom error-page path. | |
| logging | No | Access / error log settings. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Whether the request succeeded. | |
| operation | No | The operation performed (generate or presets). | |
| result | No | For generate: the three configs plus warnings and explanation. For presets: a presets array of starter configurations. |