Apache Config (GMM) — VS Code ExtensionApache httpd and Works in VS Code and every Open VSX editor (VSCodium, Cursor, Windsurf, Gitpod, Eclipse Theia). Built and maintained by Juan Torchia as part of GMM Software Solutions.
Why another Apache extensionThe Apache extensions on the Marketplace highlight syntax and stop there. This one ships a language server with a catalog of all 731 directives of httpd 2.4 and its official modules (generated from httpd.apache.org: syntax, default, context, AllowOverride class, module, status), with argument counts taken from httpd's own command tables, and uses it to validate, complete and document your config. It was checked against the stock configs of Debian, Ubuntu and Rocky Linux (RHEL), the official FeaturesValidation that mirrors
|
| Check | Severity | Example |
|---|---|---|
| Directive not allowed in this context | Error | Listen inside <VirtualHost>, ServerName inside <Directory>, <Directory> inside <Directory> |
Directive not allowed in .htaccess |
Error | Listen 80 in a .htaccess file |
| AllowOverride class not granted | Error | RewriteEngine On in .htaccess when apache.htaccess.allowOverride is ["AuthConfig"] |
| Invalid number of arguments | Error | DocumentRoot /a /b, or ServerAdmin a@b # comment (Apache has no trailing comments) |
On/Off flags |
Error | KeepAlive maybe |
| Section written as a directive, or the reverse | Error | VirtualHost *:80 without < > |
Unclosed or mismatched sections, missing >, unterminated quotes |
Error | Expected </VirtualHost> but saw </Directory> |
AllowOverride outside a plain <Directory> |
Warning | AllowOverride None in <Location> |
| Unknown directive | Warning | ServerSignatur On |
| Certificate or key file not found | Information | SSLCertificateFile /etc/ssl/certs/site.pem — switch off with apache.validate.missingCertificates |
Contexts follow the docs: server config, virtual host, directory (<Directory>, <Location>, <Files>, <If>, …), .htaccess and <Proxy>, looking through <IfModule>, <IfDefine>, <IfVersion>, <Limit> and <RequireAll>. Files meant to be included (conf-available/*.conf, snippets) are recognised as fragments: their top level accepts every context. <Macro> bodies are skipped.
Directives of common third-party modules (mod_php, mod_wsgi, Passenger, ModSecurity, mod_fcgid, mod_jk, mod_perl, mod_auth_openidc, mod_evasive, …) are never reported, nor is anything inside <IfModule> of a module that is not part of httpd. Add your own module's directives to apache.validate.ignoredDirectives.
mod_rewrite help

- Every
RewriteRuleandRewriteCondflag is completed inside[ ]and documented on hover. - Unknown flags, missing brackets,
R=codes httpd does not know and argument lines that are notPattern Substitution [flags]are errors, exactly asapachectl -treports them. - Patterns that do not compile (
^(foo,*bar) are errors; PCRE-only syntax is left alone. RewriteRule ^/…in a.htaccessor<Directory>never matches (the per-directory path has no leading slash): warning.- A
RewriteCondthat noRewriteRulefollows is ignored by Apache: warning.
TLS lint against the Mozilla guidelines
SSL* directives are checked against the Mozilla Server Side TLS profile you pick in apache.tls.profile (intermediate, the default, or modern; guideline 6.0). The same rule IDs run in NGINX Config and HAProxy Config.
| Rule | Severity | Example |
|---|---|---|
tls-weak-protocol |
Warning | SSLProtocol all -SSLv3 still enables TLSv1 and TLSv1.1 — quick fix: -all +TLSv1.2 +TLSv1.3 |
tls-protocol-not-in-profile |
Information | TLSv1.2 under modern — same quick fix |
tls-weak-cipher |
Warning | RC4, 3DES/DES, EXPORT, NULL, MD5, CBC-SHA1 suites, or ALL/MEDIUM/LOW |
tls-cipher-not-in-profile |
Information | HIGH:!aNULL, or a TLS 1.3 ciphersuite outside the profile |
tls-hsts-missing |
Information | A <VirtualHost> with SSLEngine on and no Strict-Transport-Security |
tls-hsts-short-max-age |
Information | max-age=31536000 — quick fix: 63072000 |
tls-prefer-server-ciphers |
Information | SSLHonorCipherOrder on — quick fix: off |
tls-weak-dhparam |
Warning | SSLOpenSSLConfCmd DHParameters with fewer than 2048 bits |
tls-session-tickets |
Information | SSLSessionTicketKeyFile (static key, never rotated) |
tls-compression / tls-insecure-renegotiation |
Warning | SSLCompression on, SSLInsecureRenegotiation on |
Configs produced by the Mozilla generator report nothing under their profile. Turn single rules off with apache.tls.lint.disabledRules, the whole lint with apache.tls.lint.enable, or one line with a comment above it:
# gmm-lint-disable-next-line tls-weak-protocol
SSLProtocol all -SSLv3 -TLSv1
Security lint
Conservative checks in the spirit of gixy, written from the httpd docs: each one fires only on what the file says, and stock distribution configs stay silent.
| Rule | Severity | Example |
|---|---|---|
sec-options-indexes |
Information | Options +Indexes in a virtual host, <Location> or .htaccess |
sec-server-tokens |
Information | ServerTokens Full |
sec-server-signature |
Information | ServerSignature EMail, or On together with ServerTokens Full |
sec-trace-enable |
Information | TraceEnable On / extended |
sec-root-directory-granted |
Warning | <Directory /> with Require all granted |
sec-open-proxy |
Warning | ProxyRequests On without a <Proxy> section that restricts access |
sec-status-public |
Warning | SetHandler server-status with Require all granted |
See docs/security-lint.md for what each rule checks and what it deliberately leaves alone.
Hover docs from httpd.apache.org

Syntax, summary, default, contexts, the AllowOverride class (highlighted in .htaccess files), module and status, compatibility notes, and the start of the official description with a link to the full page.
Context-aware completion

Only the directives valid where the cursor is (server level, <VirtualHost>, <Directory>, .htaccess, …), sections as snippets with their closing tag, </ to close the open section, On/Off and other keyword values, Options, AllowOverride and Require keywords, and mod_rewrite flags.
Navigation and outline

- Follow
Include/IncludeOptional: Ctrl/Cmd+click opens the file; go to definition on a wildcard or a directory lists every match. Relative paths resolve against the ServerRoot (the folder withapache2.conf,httpd.conforconf/httpd.conf), and absolute production paths such as/etc/apache2/sites-enabled/*.confare also looked up inside your workspace. - Outline and breadcrumbs for every section, with each virtual host named by its
ServerNameand showing aliases, DocumentRoot and TLS. - Folding for sections and comment runs.
A formatter that never deletes lines

Format Document only re-indents by section depth and trims trailing whitespace. It never joins, splits, adds or removes lines, never touches the text of comments or continuation lines, and running it twice changes nothing. It is tested for exactly that on every fixture, including 330+ stock config files.
Certificate details and checks

Hover the file of SSLCertificateFile, SSLCertificateChainFile or SSLCACertificateFile to see the subject, SANs, issuer, validity with the days left, key type and chain, with an Open in CertView link. Hover SSLCertificateKeyFile to see the key type and whether it matches the certificate — never its content.
| Check | Severity |
|---|---|
cert-expired — the certificate (or one in its chain) has expired |
Warning |
cert-expiring — it expires within apache.certificates.expiryWarningDays (30) |
Warning |
cert-key-mismatch — SSLCertificateKeyFile (or a key inside the certificate file) does not belong to the certificate |
Error |
cert-key-unverifiable — the key is encrypted |
Information |
cert-name-mismatch — a ServerName or ServerAlias is not in the certificate's SANs |
Warning |
cert-chain-order / cert-chain-incomplete — the chain (certificate file plus SSLCertificateChainFile) is not leaf-first, or the intermediate is missing |
Information |
Only files inside your workspace are read (production paths are mapped into it, like includes). To read files elsewhere on this machine, turn on apache.certificates.allowOutsideWorkspace. Everything uses Node's built-in crypto.
Open certificates in CertView

With the free CertView extension installed, an Open in CertView CodeLens (with the days until expiry) appears above SSLCertificateFile, SSLCertificateChainFile and SSLCACertificateFile. One click shows the subject, SANs, validity, chain and lint findings of the certificate Apache will serve.

Syntax highlighting and snippets

TextMate grammar for directives, sections, %{SERVER_VARS}, ${DEFINES}, back-references, strings, key=value parameters, rewrite flags, numbers, comments and continuation lines. Snippets: vhost-http, vhost-https (Mozilla intermediate with HSTS), vhost-redirect-https, reverse-proxy, directory, rewrite-front-controller.
File detection
The apache language is used for httpd.conf, apache2.conf, httpd*.conf, .htaccess and *.htaccess, *.apacheconf, *.vhost, and .conf files under apache2/, apache/, httpd/ and conf.modules.d/. Files in folders that nginx and other servers share — sites-available/, sites-enabled/, conf.d/, conf-available/, vhosts.d/ — switch to Apache when their content has Apache sections or directives (also when another extension opened them as nginx), so both extensions can be installed side by side. For other names, pick Apache in the language picker or add a files.associations entry:
"files.associations": { "*.vhost.tmpl": "apache" }
Settings
| Setting | Default | Description |
|---|---|---|
apache.validate.enable |
true |
Live diagnostics. |
apache.validate.unknownDirectives |
true |
Warn about directives outside httpd and its official modules. |
apache.validate.ignoredDirectives |
[] |
Directive names never reported as unknown (third-party modules). |
apache.validate.missingCertificates |
true |
Report certificate/key files that cannot be found locally (information). |
apache.htaccess.allowOverride |
["All"] |
The AllowOverride classes your server grants .htaccess files; directives needing another class are errors. |
apache.tls.lint.enable |
true |
Check TLS settings against the Mozilla guidelines. |
apache.tls.profile |
intermediate |
Mozilla profile: intermediate or modern. |
apache.tls.lint.disabledRules |
[] |
TLS rule IDs that are never reported. |
apache.security.lint.enable |
true |
Report common security misconfigurations. |
apache.security.lint.disabledRules |
[] |
Security rule IDs that are never reported. |
apache.certificates.diagnostics |
true |
Report expired/expiring certificates, mismatched keys, names outside the SANs and chain problems. |
apache.certificates.expiryWarningDays |
30 |
Days before expiry that cert-expiring starts. |
apache.certificates.allowOutsideWorkspace |
false |
Read certificate and key files outside the workspace. |
apache.completion.enable |
true |
Context-aware completion. |
apache.certView.codeLens |
true |
Show Open in CertView when CertView is installed. |
apache.trace.server |
off |
Language server protocol tracing. |
Privacy
No telemetry, no network access. The extension reads the Apache files you open and the certificate, key, DH parameter and included files they reference inside your workspace (outside it only if you opt in). Private keys are only checked against their certificate; their content is never shown or sent anywhere.
Development
npm ci && npm ci --prefix client && npm ci --prefix server
npm run build
npm test # unit + integration (integration needs a display, e.g. xvfb-run)
npm run catalog:generate # refresh the directive catalog from httpd.apache.org
npm run tls:generate # refresh the Mozilla TLS profiles (pinned guideline)
scripts/check-with-httpd.sh # check the valid fixtures against real httpd builds (Docker)
See docs/development.md, docs/architecture.md, docs/tls-lint.md, docs/security-lint.md and docs/certificates.md.
Need help with this in your team's workflow? See how to work with GMM.

