Logs

Every site gets its own access and error log. When a page returns 500, the error log for that site is the first and usually the last place you need to look.

Where they are

All of them are in Apache's log directory:

/opt/homebrew/var/log/httpd/

The file names come from the site's ServerName with .test stripped off, so myapp.test writes:

FileHolds
myapp_error.logPHP fatals, Apache errors, whatever LogLevel lets through
myapp_access.logOne line per request
myapp_ssl_error.logThe same, for requests that arrived over HTTPS
myapp_ssl_access.log

HTTPS traffic is logged separately because it is served by a separate vhost block. If a site is reachable both ways, look in both — a request that failed over HTTPS leaves nothing in the plain-HTTP log.

Apache's own logs — error_log and access_log, without a site prefix — hold anything not attributable to one site, including the reason a start-up failed.

Reading them in the app

Environment → Logs lists every .log file in that directory, newest first, with its size. Tail shows the end of a file — up to the last 2000 lines, reading only the last 256 KB, so opening a log that has grown to hundreds of megabytes is still instant.

The filter box narrows the list by name, which is the fast way to a specific site when you have twenty of them.

Following one live

The app shows a snapshot; for a live feed use a terminal:

tail -f /opt/homebrew/var/log/httpd/myapp_error.log

Turning up the detail

Each site has its own LogLevel, set when you create or edit it. warn is the default.

Raise it to debug while you are chasing something — a rewrite rule that does not fire, a proxy that will not connect — and the error log will explain each decision Apache makes. Put it back afterwards: debug on a busy site produces a great deal of output.

Rotation

Vhostly does not rotate these files and neither does Homebrew's Apache by default. On a long-lived machine they grow without limit.

Deleting a log while Apache is running frees the name but not the disk space, because the process still holds the file handle. Restart Apache from the Apache panel afterwards, or truncate instead:

: > /opt/homebrew/var/log/httpd/myapp_access.log

Do not confuse these with the backups directory, which holds configuration snapshots and is pruned automatically.