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:
| Path | Why |
|---|---|
/opt/homebrew/etc/httpd/httpd.conf | Modules, Listen 443, the Include lines, the PHP module |
/opt/homebrew/etc/httpd/extra/httpd-vhosts.conf | Active sites |
/opt/homebrew/etc/httpd/extra/httpd-vhosts.conf.disabled | Disabled sites |
/etc/hosts stays owned by root and is written by the hosts helper below.
Files it creates
| Path | Holds |
|---|---|
/Library/PrivilegedHelperTools/app.vhostly.hosts | The hosts helper, owned by root. Its source is on the security page |
/etc/sudoers.d/vhostly | One rule: that helper, as root, without a password, with no arguments |
/opt/homebrew/etc/httpd/extra/httpd-vhosts-ssl.conf | Every <VirtualHost *:443> block |
/opt/homebrew/etc/httpd/extra/httpd-vhosts-lan.conf | Sites 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.json | Each proxy site's start command and the folder it runs in |
~/Library/Application Support/Vhostly/runners.pids.json | Process IDs of running start commands, so a crashed Vhostly can stop them |
~/Library/Application Support/Vhostly/state.json | App 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
LoadModulelines formod_proxy,mod_proxy_http,mod_proxy_wstunnel,mod_rewrite,mod_sslandmod_socache_shmcb, when you turn those on. - Rewrites the
LoadModule php_modulepath when you switch Apache's PHP version. - Adds
Listen 443afterListen 80, the first time a site gets HTTPS. - Adds
Include …/httpd-vhosts-ssl.confafter the existing vhostsInclude. - Adds
Include …/httpd-vhosts-lan.confwhile 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:
-
Delete the Vhostly block from
/etc/hosts, the lines from# >>> vhostlyto# <<< vhostly <<<:sudo nano /etc/hosts. -
Delete
/opt/homebrew/etc/httpd/extra/httpd-vhosts-ssl.conf, and remove itsIncludeline plusListen 443fromhttpd.conf. Do the same forhttpd-vhosts-lan.confand itsIncludeline, if you ever shared a site on your network. -
Empty or delete
/opt/homebrew/etc/httpd/extra/httpd-vhosts.confand its.disabledtwin, and their*.backup-*files. -
Delete
/opt/homebrew/etc/httpd/certs/, and untrust the mkcert authority —mkcert -uninstall, or remove it in Keychain Access. -
Remove the helper and its rule:
sudo rm /etc/sudoers.d/vhostly /Library/PrivilegedHelperTools/app.vhostly.hosts -
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.