/go/conf: conf from the Command Line

/go/conf regenerates the web server configuration from GoAdmio's database. It has two main modes. One domain (conf <domain>) rewrites that account's Apache and Nginx virtual host and its PHP-FPM pool, then reloads the services. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Rebuild the web configuration of one account
/go/conf example.com

# Rebuild everything
/go/conf

Options

All options are optional.

Option Applies to Effect
--force Full rebuild (also runs ws first in one-domain mode) See --force.
--installwebserver Full rebuild Installs the web server packages before rebuilding. See Installing the web servers.
--limit Full rebuild Passed unchanged to installssl, ssl, and mailssl. See those commands for what it does.
--skip ssl Full rebuild Skips the ssl all step. Does not skip the per-subdomain step. See Subdomains.
--skip mailssl Full rebuild Skips the mailssl step.
--schedule Full rebuild Queues a rebuild in 3 minutes instead of running one now.

--force

With --force, the command:

  1. Runs ws first, to correct which web server (Apache or Nginx) GoAdmio is set to use.
  2. Deletes every PHP-FPM pool file in every PHP version, except www.conf.
  3. Deletes everything in /etc/letsencrypt/.
  4. Runs installssl, then ssl all (unless --skip ssl is given) to issue certificates again.

Without --force, only the pool files of accounts whose /home/<domain> folder is gone are deleted, and existing certificates are kept.

Examples

# One account
/go/conf example.com

# Full rebuild, no certificate requests
/go/conf --skip ssl --skip mailssl

# Install Apache and Nginx packages, then rebuild
/go/conf --installwebserver

# Queue a rebuild in 3 minutes
/go/conf --schedule

# Full rebuild that also resets all certificates and pools
/go/conf --force

Output

Progress is printed in sections. Each section ends with a . line.

Message Meaning
Deleting <file> Pool... A PHP-FPM pool file for an account that no longer exists is being removed.
Domains Configuration... Start of the account loop.
[<n>/<total>] Configuration completed for <domain> (<php version>) The account’s virtual hosts and pool were rebuilt.
[<n>/<total>] Configuration completed for <domain> (<php version>). FPM Diabled (INSCURE) Same, and the account has PHP-FPM turned off.
Sub-Domains Configuration... Start of the subdomain loop.
[<n>/<total>] Configuration completed for <subdomain> (<php version>) The subdomain was processed.
Creating GoAdmio PHP-FPM Pool... The pool for the GoAdmio panel is rebuilt.
Installing Missing SSL Certificates... Shown without --force and without --skip ssl, before ssl all runs.
Restarting Web Server and PHP-FPM... Final step.

Accounts that are not in the Site table, or that have no www folder, are skipped without a message. The total in [<n>/<total>] counts every folder in /home with a dot in its name, so it can differ from the number of accounts processed.

Exit status

Mode Exit status
One domain Always 1, even on success.
--schedule Always 1.
Full rebuild 0 when it reaches the end.

See the full reference at /go/conf 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 *