Methods |
public
|
__construct()
void __construct(void)
|
#
|
public
|
__wakeup()
|
#
|
public
|
user_service_enabled(string $user, string $svc): bool
User capability is enabled for web service
User capability is enabled for web service
Possible values subdomain, cgi
Parameters
$user |
user
|
$svc |
service name possible values subdomain, cgi
|
|
#
|
public
|
validate_subdomains(): array
Sweep all subdomains to confirm accessibility
Sweep all subdomains to confirm accessibility
Returns
list of subdomains invalid
|
#
|
public
|
is_subdomain(string $hostname): bool
Check if hostname is a subdomain
Check if hostname is a subdomain
|
#
|
public
|
subdomain_accessible($subdomain)
|
#
|
public
|
get_user(string $hostname, string $path = ''): string
Get assigned web user for host/docroot
Get assigned web user for host/docroot
Parameters
$hostname |
hostname or path
|
|
#
|
public
|
get_sys_user(): string
Get HTTP system user
Get HTTP system user
HTTP user has limited requirements except read.
In a PHP-FPM environment, no write access is permitted by this user.
|
#
|
public
|
normalize_path(string $hostname, string $path = ''): string
Retrieve document root for given host
Retrieve document root for given host
Doubly useful to evaluate where documents
will be served given a particular domain
Parameters
$hostname |
HTTP host
|
$path |
optional path component
|
Returns
|
#
|
public
|
get_docroot(string $hostname, string $path = ''): bool|string
Get document root from hostname
Get document root from hostname
|
#
|
public
|
import_subdomains_from_domain(string $target, string $src): bool
Import subdomains from domain
Import subdomains from domain
Parameters
$target |
target domain to import into
|
$src |
source domain
|
|
#
|
public
|
list_subdomains(string $filter = '', string|array $domains = []): array|false
List subdomains on the account
List subdomains on the account
Array format- subdomain => path
Parameters
$filter |
filter by "global", "local", "path"
|
$domains |
only show subdomains bound to domain or re for path
|
Returns
|
#
|
public
|
subdomain_info(string $subdomain): array
Get detailed information on a subdomain
Get detailed information on a subdomain
Response:
path (string): filesystem location
active (bool): subdomain references accessible directory
user (string): owner of subdomain
type (string): local, global, or fallthrough
|
#
|
public
|
subdomain_exists(string $subdomain): bool
Check if named subdomain exists
Check if named subdomain exists
Fallthrough, local, and global subdomain patterns
are valid
|
#
|
public
|
list_domains(): array
|
#
|
public
|
split_host(string $host): array|bool
Split hostname into subdomain + domain components
Split hostname into subdomain + domain components
Returns
components or false on error
|
#
|
public
|
normalize_hostname(string $host): string
Get the normalized hostname from a global subdomain
Get the normalized hostname from a global subdomain
|
#
|
public
|
domain_info(string $domain): array|false
Get information on a domain
Get information on a domain
Info elements
path (string): filesystem path
active (bool): domain is active and readable
user (string): owner of directory
Returns
|
#
|
public
|
domain_exists(string $domain): bool
Test if domain is attached to account
Test if domain is attached to account
aliases:list-aliases is used to check site configuration for fixed aliases
aliases:list-shared-domains checks presence in info/domain_map
|
#
|
public
|
get_hostname_from_docroot(string $docroot): string|null
Get hostname from location
Get hostname from location
Parameters
$docroot |
document root as seen by server (does not resolve symlinks!)
|
|
#
|
public
|
get_all_hostnames_from_path(string $docroot): array
Given a docroot, find all hostnames that serve from here
Given a docroot, find all hostnames that serve from here
|
#
|
public
|
extract_components_from_path(string $docroot): null|array
Decompose a path into its hostname/path components
Decompose a path into its hostname/path components
|
#
|
public
|
bind_dav(string $location, string $provider): bool
Assign a path as a DAV-aware location
Assign a path as a DAV-aware location
Parameters
$location |
filesystem location
|
$provider |
DAV provider
|
|
#
|
public
|
site_config_dir(): string
|
#
|
public
|
allow_protocol(string $hostname, string $proto = 'http10'): bool
Permit a disallowed protocol access to hostname
Permit a disallowed protocol access to hostname
Parameters
$proto |
only http10 is valid
|
|
#
|
public
|
protocol_disallowed(string $hostname, string $proto = 'http10'): bool
Specified protocol is disallowed
Specified protocol is disallowed
|
#
|
public
|
disallow_protocol(string $hostname, string $proto = 'http10'): bool
Disallow protocol
|
#
|
public
|
unbind_dav(string $location): bool
|
#
|
public
|
list_dav_locations(): array
|
#
|
public
|
_edit()
|
#
|
public
|
_edit_user(string $userold, string $usernew, array $oldpwd)
|
#
|
public
|
rename_subdomain(string $subdomain, string $newsubdomain = null, string $newpath = null): bool
Rename a subdomain and/or change its path
Rename a subdomain and/or change its path
Parameters
$subdomain |
source subdomain
|
$newsubdomain |
new subdomain
|
|
#
|
public
|
remove_subdomain(string $subdomain, bool $keepdns = false): bool
Remove a subdomain
Parameters
$subdomain |
fully or non-qualified subdomain
|
$keepdns |
preserve DNS records for subdomain
|
|
#
|
public
|
purge(): void
Clear path cache
|
#
|
public
|
map_subdomain(string $mode, string $subdomain, string $path = null, string $user = null): bool
Manage subdomain symlink mapping
Manage subdomain symlink mapping
Parameters
$mode |
add/delete
|
$subdomain |
subdomain to add/remove
|
$path |
domain path
|
$user |
user to assign mapping
|
|
#
|
public
|
add_subdomain(string $subdomain, string $docroot): bool
Add subdomain to account
Add subdomain to account
There are 3 types of subdomains:
Local- subdomain includes subdomain + domain - foo.bar.com
Fallthrough- subdomain is named after domain - bar.com
Global- subdomain excludes domain - foo
Parameters
$docroot |
document root of the subdomain
|
|
#
|
public
|
add_subdomain_raw(string $subdomain, string $docroot): bool
|
#
|
public
|
status(): array
Get Apache service status
Get Apache service status
|
#
|
public
|
_create()
Account created
|
#
|
public
|
_verify_conf(ConfigurationContext $ctx): bool
|
#
|
public
|
_reload(string $why = '', array $args = [])
|
#
|
public
|
_housekeeping()
|
#
|
public
|
_cron(Cronus $c)
|
#
|
public
|
_delete()
|
#
|
public
|
http_config_dir(): string
|
#
|
public
|
config_dir(): string
|
#
|
public
|
_delete_user(string $user)
|
#
|
public
|
remove_user_subdomain(string $user): bool
Removes all subdomains associated with a named user
Removes all subdomains associated with a named user
|
#
|
public
|
set_ssl(string $hostname, int|Mode $redirection_mode = Mode::disabled): bool
Enable SSL/TLS redirection on hostname
Enable SSL/TLS redirection on hostname
Parameters
$redirection_mode |
value between 0 and 4
|
|
#
|
public
|
remove_ssl(string $hostname): bool
Remove SSL/TLS redirection on hostname
Remove SSL/TLS redirection on hostname
|
#
|
public
|
list_ssl(): array
List SSL-TLS upgrade hostnames
List SSL-TLS upgrade hostnames
|
#
|
public
|
inventory_capture(array|null $sites = null): void
Bulk screenshot of all sites
Bulk screenshot of all sites
|
#
|
public
|
capture(string $hostname, string $path = '', BulkCapture|null $service = null): bool
Capture screenshot of site
Capture screenshot of site
Parameters
$service |
optional BulkCapture service
|
|
#
|
public
|
_create_user(string $user)
|
#
|