GoAdmio Command Line: apache with /go/apache

/go/apache has two modes, chosen by whether you pass a domain: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Rebuild the Apache virtual host for one domain
/go/apache example.com

Arguments

Argument Mode What it does
(none) Switch mode Converts the server to Apache and reboots it.
<domain> Domain mode Writes the Apache configuration files for that domain.

Examples

# Rebuild one domain's Apache configuration
/go/apache example.com

# Apply the new configuration
/go/reload

# Check the generated files (AlmaLinux, Rocky, CentOS, Red Hat, Fedora)
ls /etc/httpd/vhost/example.com*

# Check the generated files (Debian, Ubuntu)
ls /etc/apache2/vhost/example.com*

# Review the log of past runs
tail -n 20 /var/log/go/apache.log

Output

Message Meaning
Switching from NGINX to Apache... Switch mode has started.
APACHE: Domain Directory /home/<username> not exists. Domain mode stopped. /home/<domain> does not exist. The message shows the account username, which is empty if the domain is not hosted. Exit status 1.

Domain mode prints nothing when it works. Switch mode ends with a reboot and exit status 1.

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