Apache config formatter
Processed in your browser · nothing is uploaded
Reindents an Apache configuration by block depth, treating `<Directory>`, `<VirtualHost>` and the other container directives as the levels they are.
How to use the apache config formatter
Apache containers look like HTML and are not. `<Directory /var/www>` opens a scope that `</Directory>` closes, and the nesting decides which requests a directive applies to. Indentation makes that visible; Apache itself does not care. The order in which containers are merged is the part that surprises people, and it is not the order they appear in the file. Apache applies `<Directory>` sections shortest-path-first, then `<DirectoryMatch>`, then `<Files>`, then `<Location>` — so a `<Location>` block near the top of the file overrides a `<Directory>` block at the bottom. Reading the file top to bottom and expecting the last word to win gives the wrong answer. As with nginx, this formats and does not validate. `apachectl configtest` is the authority, and it catches the things that actually break a restart: a module not loaded for a directive you used, a path that does not exist, a certificate mismatch.
Questions
No. The containers define the scope; the indentation is for you.