/go/keepalive changes the Apache setting KeepAlive in Apache's main configuration file. KeepAlive decides whether a visitor's browser can send several requests over one connection (On) or must open a new connection for every request (Off). After changing the file, the command reloads PHP-FPM and the web server. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Check the current value
/go/keepalive return
# Turn it off
/go/keepalive Off
# Turn it on
/go/keepalive On
Arguments
| Argument | Required | Default | Notes |
|---|---|---|---|
[value] |
No | On |
Use On or Off. All arguments are joined with spaces. |
return |
No | — | Prints the current value. Not case-sensitive. |
--noreload |
No | — | Only recognized as the sole argument, and currently has no effect on the reload. |
The command has no other options.
Examples
# Read the current value
/go/keepalive return
# Turn persistent connections off
/go/keepalive Off
# Turn them on again
/go/keepalive On
# Check the line in the configuration file (Debian and Ubuntu)
grep -n "KeepAlive" /etc/apache2/apache2.conf
Output
| Outcome | What you get |
|---|---|
return |
The current value, such as On. Empty if it can’t be read. Exit code 1. |
| Value set | KeepAlive updated successfully., then the output of reload. |
The confirmation line is printed even when the file wasn’t changed.
Logging
Every run is appended to /var/log/go/keepalive.log.
See the full reference at /go/keepalive 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.
