VS Code extension

Apache Config for VS Code

Catch what apachectl -t or a 500 from a broken .htaccess would tell you—a directive outside its context, the wrong number of arguments, a RewriteRule flag that does not exist, an unclosed <VirtualHost>—while editing.

Open source and maintained by Juan Torchia.

Current release
v0.1.0
Marketplace downloads
0
Observed Dec 3, 2026
Compatibility
VS Code 1.110+ and Open VSX editors
License
MIT

See it in the editor

Apache Config in VS Code flagging Listen inside a VirtualHost, a wrong argument count, an invalid On/Off value, an unknown RewriteRule flag, and a trailing comment in the Problems panel
Diagnostics mirror what apachectl -t would refuse, as you type.
Hover documentation for the ProxyPass directive showing its syntax, summary, contexts, and module from httpd.apache.org
Hover shows syntax, default, contexts, override class, and module from httpd.apache.org.
Hover over the R=301 flag of a RewriteRule in a .htaccess file explaining the redirect flag
Every RewriteRule and RewriteCond flag is completed and documented.
Completion list offering the Proxy directives valid inside a VirtualHost section
Completion offers only the directives valid where the cursor is.
An Apache virtual host after Format Document, re-indented by section depth with its comment kept in place
Formatting re-indents without joining, splitting, or removing lines.
Open in CertView CodeLens with the days until expiry above an SSLCertificateFile directive in a virtual host
Open in CertView appears above SSLCertificateFile when CertView is installed.

A focused tool for a specific workflow

Apache httpd and .htaccess validation, mod_rewrite help, hover documentation from httpd.apache.org, safe formatting, and TLS, security, and certificate checks inside VS Code.

  • A language server with a catalog of all 731 directives of httpd 2.4 and its official modules, generated from httpd.apache.org, with argument counts from httpd's own command tables
  • Diagnostics for directives outside their context, directives not allowed in .htaccess or by the AllowOverride classes in effect, wrong argument counts, and unclosed or mismatched sections
  • mod_rewrite help: flag completion and hover, unknown flags, patterns that do not compile, and ^/ patterns that never match in per-directory context
  • Context-aware completion, hover documentation from httpd.apache.org, an outline of virtual hosts, and Include navigation
  • A formatter that only re-indents and trims trailing whitespace: it never joins, splits, adds, or removes lines
  • TLS lint against the Mozilla Server Side TLS guidelines, a conservative security lint, certificate details for referenced files, and an Open in CertView CodeLens

From install to a safer decision

  1. Install the extension and open httpd.conf, apache2.conf, a .htaccess file, a vhost under sites-available, or any file set to the Apache language.
  2. Review inline diagnostics and use context-aware completion, hover documentation, and Go to Definition for Include and IncludeOptional while editing.
  3. Check mod_rewrite, TLS, security, and certificate findings, and open referenced certificates in CertView when it is installed.
  4. Run apachectl -t (and a request against the directory for .htaccess changes) before reloading the server.

How the pieces fit together

This is a textual architecture map grounded in the public implementation. Follow the source link to inspect the exact modules, tests, and release history.

  1. The VS Code client activates for Apache configuration and .htaccess files, switches vhost and conf.d files to Apache by content, and owns editor commands, settings, and the Open in CertView CodeLens.

  2. The client exchanges Language Server Protocol messages with a bundled language server that parses sections and continuation lines and resolves Include paths against the ServerRoot.

  3. The server checks directives against the generated httpd.apache.org catalog and a Mozilla TLS catalog pinned to guideline 6.0, and reads referenced certificate and key files with Node's built-in crypto.

Inspect the implementation on GitHub

Supported scope

  • httpd.conf, apache2.conf, httpd*.conf, *.apacheconf, and *.vhost
  • .htaccess and *.htaccess files, checked against the .htaccess context and AllowOverride classes
  • Files under apache2, httpd, sites-available, sites-enabled, conf.d, and conf-available, recognized by content when other servers share the folder
  • Certificates and keys referenced by SSLCertificateFile and related directives

Explicit boundaries

  • Diagnostics are editor feedback, not a substitute for running apachectl -t against the target build and loaded modules before reload or deployment.
  • The extension has no telemetry and no network access. Certificate and key files outside the workspace are read only after opting in, and private key content is never shown or sent anywhere.
  • When filing public issues, use a minimal sanitized configuration and remove hosts, addresses, credentials, certificates, and other production details.
Read the security policy

Get help, verify changes, or contribute

Issues and release history stay with the source repository so the evidence remains public.

Need this kind of workflow inside your team?

Start with a bounded workflow review. Product support stays in public issues; organization-specific discovery and implementation follow a private path.

Review the engagement