What Vhostly writes

The app edits a few Apache files and one block of /etc/hosts. Here is the complete list, so nothing it does is a surprise.

Every path below assumes Homebrew's default prefix on Apple silicon, /opt/homebrew.

Files it edits as you

These live in Homebrew's folder, which already belongs to you, so no extra permission is involved:

PathWhy
/opt/homebrew/etc/httpd/httpd.confModules, Listen 443, the Include lines, the PHP module
/opt/homebrew/etc/httpd/extra/httpd-vhosts.confActive sites
/opt/homebrew/etc/httpd/extra/httpd-vhosts.conf.disabledDisabled sites

/etc/hosts stays owned by root and is written by the hosts helper below.

Files it creates

PathHolds
/Library/PrivilegedHelperTools/app.vhostly.hostsThe hosts helper, owned by root. Its source is on the security page
/etc/sudoers.d/vhostlyOne rule: that helper, as root, without a password, with no arguments
/opt/homebrew/etc/httpd/extra/httpd-vhosts-ssl.confEvery <VirtualHost *:443> block
/opt/homebrew/etc/httpd/extra/httpd-vhosts-lan.confSites shared on your network, each on its own port
/opt/homebrew/etc/httpd/certs/Per-site certificates, <name>.pem and <name>-key.pem
/opt/homebrew/etc/httpd/extra/*.backup-*Config snapshots, 50 kept per file
~/Library/Application Support/Vhostly/runners.jsonEach proxy site's start command and the folder it runs in
~/Library/Application Support/Vhostly/runners.pids.jsonProcess IDs of running start commands, so a crashed Vhostly can stop them
~/Library/Application Support/Vhostly/state.jsonApp settings — notifications, onboarding, and the random id behind the launch ping

Certificates are signed by mkcert's authority, which lives in $(mkcert -CAROOT) and is mkcert's to manage, not Vhostly's.

What it changes inside httpd.conf

Narrow, specific edits — the file is never reformatted or reordered:

  • Uncomments LoadModule lines for mod_proxy, mod_proxy_http, mod_proxy_wstunnel, mod_rewrite, mod_ssl and mod_socache_shmcb, when you turn those on.
  • Rewrites the LoadModule php_module path when you switch Apache's PHP version.
  • Adds Listen 443 after Listen 80, the first time a site gets HTTPS.
  • Adds Include …/httpd-vhosts-ssl.conf after the existing vhosts Include.
  • Adds Include …/httpd-vhosts-lan.conf while network mode is on, and removes it when network mode is switched off.

Everything else in that file stays yours.

What it changes inside /etc/hosts

One marked block at the end of the file, rewritten as a whole each time a site is added, removed or switched:

# >>> vhostly: managed by Vhostly, do not edit >>>
127.0.0.1 myapp.test
::1 myapp.test
# <<< vhostly <<<

Both addresses, because macOS queries IPv6 first and an absent ::1 entry costs a five-second timeout on every lookup. Only names ending in .test or .localhost are accepted. Everything outside the markers is left exactly as it is.

Versions before 1.3 appended names to the existing localhost lines instead; the helper moves them into the block the first time it runs.

Logs

Per-site logs are written by Apache, to Apache's own directory — /opt/homebrew/var/log/httpd/. Vhostly names them and reads them but does not rotate or delete them. See logs.

What it never touches

Your document roots. Your project files. Your databases. Your shell configuration. Any Apache config file other than the ones listed above.

Reverting by hand

To return the machine to its previous state without the app:

  1. Delete the Vhostly block from /etc/hosts, the lines from # >>> vhostly to # <<< vhostly <<<: sudo nano /etc/hosts.

  2. Delete /opt/homebrew/etc/httpd/extra/httpd-vhosts-ssl.conf, and remove its Include line plus Listen 443 from httpd.conf. Do the same for httpd-vhosts-lan.conf and its Include line, if you ever shared a site on your network.

  3. Empty or delete /opt/homebrew/etc/httpd/extra/httpd-vhosts.conf and its .disabled twin, and their *.backup-* files.

  4. Delete /opt/homebrew/etc/httpd/certs/, and untrust the mkcert authority — mkcert -uninstall, or remove it in Keychain Access.

  5. Remove the helper and its rule:

    sudo rm /etc/sudoers.d/vhostly /Library/PrivilegedHelperTools/app.vhostly.hosts
    
  6. Delete ~/Library/Application Support/Vhostly.

Then brew services restart httpd. Uninstalling Apache and PHP themselves is brew uninstall, and has nothing to do with Vhostly.