GoAdmio Command Line: checknginx with /go/checknginx

Nginx refuses to start or reload when a virtual host points to an SSL certificate file that does not exist. /go/checknginx repairs this situation. It: It works only on servers that run Nginx. On an Apache server it does nothing; use checkapache there. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

/go/checknginx

Options

None. Any arguments you pass are ignored.

Examples

# Check and repair
/go/checknginx

# Read the result of the Nginx test that the command saved
cat /usr/local/goadmio/tmp/checknginx.db

# Confirm that Nginx is healthy afterwards
nginx -t

# Install a new certificate for a domain whose configuration was removed
/go/ssl example.com

Output

The command prints one line for each virtual host it removes:

Deleting example.com Configuration

It prints nothing when the test finds no matching error, or when the server does not run Nginx. The result of the Nginx test itself is not shown. It is saved in /usr/local/goadmio/tmp/checknginx.db.

Each run also adds a line to /var/log/go/checknginx.log.

See the full reference at /go/checknginx and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *