# urbestack-domain-log

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-domain-log --name DOMAIN --type access|error|php [--lines N] [--after BYTES]
urbestack-domain-log --name DOMAIN --type access|error|php --whole
```

## Description

Reads a domain's access, error or PHP error log. By default, returns the last 100 lines. --lines sets the line limit, with a minimum of 1 and a maximum of 1000. The offset field gives the byte position after the last complete line read.

Pass an earlier offset to --after to read up to the line limit from that byte position. If the log is now shorter than that offset, the command returns the last lines and sets reset.

Use --whole to get the log as base64 for saving as a file. The size limit comes from the file manager's files.upload_limit_mb setting. For a larger log, the command returns the newest portion starting at a line boundary and sets cut.

UrbeStack reads per-domain logs through this command, including for API requests. The log directories are owned by root and the customer.

## Same in the API

- [GET /domains/{name}/logs/{type}](https://urbestack.com/docs/api/get-domains-name-logs-type.md): Read lines from a domain's access, error or PHP error log
- [GET /domains/{name}/logs/{type}/content](https://urbestack.com/docs/api/get-domains-name-logs-type-content.md): Get a domain's access, error or PHP error log as base64

## Command family: domain

- [urbestack-domain-add](https://urbestack.com/docs/commands/urbestack-domain-add.md): Adds a hosted domain to a customer account.
- [urbestack-domain-alias-add](https://urbestack.com/docs/commands/urbestack-domain-alias-add.md): Adds an alias to an existing domain so Apache serves both names from the same document root.
- [urbestack-domain-alias-del](https://urbestack.com/docs/commands/urbestack-domain-alias-del.md): Removes an alias and updates Apache, DNS and mail configuration.
- [urbestack-domain-del](https://urbestack.com/docs/commands/urbestack-domain-del.md): Deletes a domain and its subdomains, along with their Apache virtual hosts, PHP-FPM pools, mailboxes, certificates and statistics.
- [urbestack-domain-list](https://urbestack.com/docs/commands/urbestack-domain-list.md): Lists domains in name order or returns a single domain by name.
- [urbestack-domain-modsec-set](https://urbestack.com/docs/commands/urbestack-domain-modsec-set.md): Sets the ModSecurity mode or the owner's choice for a domain.
- [urbestack-domain-modsec-show](https://urbestack.com/docs/commands/urbestack-domain-modsec-show.md): Shows the server's ModSecurity mode, the administrator's mode for the domain, the owner's choice and the mode in force.
- [urbestack-domain-redirect-add](https://urbestack.com/docs/commands/urbestack-domain-redirect-add.md): Adds an HTTP redirect from a path on a domain.
- [urbestack-domain-redirect-del](https://urbestack.com/docs/commands/urbestack-domain-redirect-del.md): Removes redirects for a source path on a domain.
- [urbestack-domain-set](https://urbestack.com/docs/commands/urbestack-domain-set.md): Changes settings for an existing domain and synchronizes the DNS zones UrbeStack manages.
