GoAdmio

503

Install the 503 Service Unavailable page for one domain or all domains

On this page: Overview · Quick start · Syntax · Arguments · Output · Examples · Troubleshooting · Details · See also


Overview

/go/503 copies GoAdmio's default 503.shtml page into a site's www folder. It:

The command only copies the file. It does not change the web server configuration.

[!WARNING] An existing 503.shtml in the site is deleted first. Any changes you made to it are lost.


Quick start

# Install the 503 page for every hosted domain
/go/503

Syntax

/go/503 [domain|all]

If you are not root, the command re-runs itself with sudo. It takes one optional argument and has no -- options. Only the first argument is read.


Arguments

Argument Effect
(none) Installs the page for every domain.
all Installs the page for every domain.
<domain> Installs the page for that domain only.

A domain is processed only when /home/<domain>/www exists. The name is used as typed. It is not checked or normalized.


Output

The command prints nothing, whether or not it copied anything. To check the result, look at the file:

ls -l /home/example.com/www/503.shtml

The command always finishes without an error status, even when the domain does not exist.


Examples

# Install the 503 page for every hosted domain
/go/503
# The same, written explicitly
/go/503 all
# Install it for one domain
/go/503 example.com
# Review the log of past runs
tail -n 20 /var/log/go/503.log

Troubleshooting

Symptom Likely cause Fix
Nothing happens for a domain /home/<domain>/www does not exist, for example because of a typo. Check the name with ls /home.
cp: cannot stat '/usr/local/goadmio/home/503.shtml' The template is missing. The site's old 503.shtml was already deleted. Restore the template, then run /go/503 <domain> again.
Your custom 503.shtml is gone The command replaces the file. Restore it from a backup, or edit the template to hold your text and run the command again.
The new file is owned by root The copy is made as root. None needed for serving the page.
The page is not shown during a 503 error The command does not change the web server configuration. Rebuild the configuration with conf.

Details

What it does for each domain

# Step
1 Check that /home/<domain>/www exists. If not, skip the domain.
2 Delete /home/<domain>/www/503.shtml.
3 Copy /usr/local/goadmio/home/503.shtml to /home/<domain>/www/503.shtml.

With no argument or all, the command goes through every entry in /home and applies these steps. Entries without a www folder are skipped.

Changing the page for all sites

Edit the template, /usr/local/goadmio/home/503.shtml, then run /go/503. Every site's 503.shtml is replaced with the new version.

Logging

Every run appends its arguments with a timestamp to /var/log/go/503.log.

What a run does

flowchart TD
    A["503 [domain|all]"] --> B{"No argument, or all?"}
    B -- "Yes" --> C["For each entry in /home"]
    B -- "No" --> D["Use the given domain"]
    C --> E
    D --> E{"/home/domain/www exists?"}
    E -- "No" --> X["Skip"]
    E -- "Yes" --> F["Delete old 503.shtml"]
    F --> G["Copy the template"]

See also

Command Description
conf Rebuild the Apache/Nginx configuration in GoAdmio
default Restore the default Apache/Nginx vhost for a domain
create Create a GoAdmio account from the command line
web Restart or reload the active web server