Web Servers
Manage nginx, Apache and Caddy on your hosts: sites, config, logs and HTTPS, with every change tested first.
- See nginx, Apache and Caddy on a host with their version and state
- List every site with its domains, ports, HTTPS and certificate expiry
- Add static, reverse proxy, PHP and redirect sites from a form
- Edit any config file, with a test before every save and backups to go back to
- Turn sites on and off, start, stop, reload and restart the server
- Get a Let's Encrypt certificate for a site with certbot
- Read and follow access and error logs, with counts by status, path and client
- Install nginx, Apache, Caddy or certbot
- Get an alert when a web server stops
- A dashboard card, a panel beside the terminal and a Web Servers card in Host Metrics
Web Servers manages nginx, Apache and Caddy on a Linux host over SSH. Each host gets its own tab for its sites, config files, logs and the server itself. Every change is tested with the server's own check before it reloads, and a broken change is put back.
This plugin works with web servers installed on the host. For a proxy that runs inside Termix itself, use Reverse Proxy. For web servers in containers, use Docker.
Set up a host
- Make sure Termix logs in to the host as root, or as a user with passwordless sudo, or save the host's Sudo Password.
- Open the host in Manage and turn on the Web Servers setting.
- Open the host menu and choose Web Servers.
- If no web server is installed, open Server and press Install next to the one you want.
Supported layouts
- nginx with
sites-availableandsites-enabled(Debian, Ubuntu), or withconf.d(Fedora, RHEL, Rocky, Alma). - Apache as
apache2withsites-availableandsites-enabled(Debian, Ubuntu), or ashttpdwithconf.d(Fedora, RHEL, Rocky, Alma). - Caddy with
/etc/caddy/Caddyfile. Termix keeps its sites in/etc/caddy/sitesand adds oneimportline to the Caddyfile the first time you add a site. The old Caddyfile is kept asCaddyfile.termix.bak.
Other layouts show their files in Config, but a new site may not be loaded if the main config does not include its folder.
What you can do
- Sites: see every site with its domains, web root or app, HTTPS and how many days its certificate has left. Turn sites on and off, or delete them.
- Add site: make a static, reverse proxy, PHP or redirect site from a form, with HTTPS, compression, an upload limit and its own log files. Press Preview to see the config before you save.
- Edit a site: sites made in the form open in the form again. Any site can be edited as text. Saving the text of a form site turns its form off, so your own changes are kept.
- Get certificate: certbot gets a Let's Encrypt certificate for the site's domains with its nginx or Apache plugin. A site made in the form switches to HTTPS with it. certbot renews it and reloads the server. Caddy does all of this by itself.
- Config: open any file under
/etc/nginx,/etc/apache2,/etc/httpdor/etc/caddy, test the config and save. The last 10 versions of each file are kept and can be restored. - Logs: read the end of any file in the server's log folder, or its journal, and follow it live. Access logs also show counts by status code, the top paths and the top clients.
- Server: start, stop, restart and reload each server, choose whether it starts at boot, and install nginx, Apache, Caddy or certbot.
Safe changes
Every save, site change, restore and reload runs the server's own test first: nginx -t, apachectl -t or caddy validate. When the test fails, the file is put back and the server keeps running the old config. The error shows in Termix.
Old versions of changed and deleted files are kept on the host in /var/lib/termix-web-servers/backups.
Alerts
Press the bell to get alerts for a host. Termix checks every minute as you and sends one alert when a web server stops and one when it runs again.
Logs and permissions
Reading logs and following them live uses the same login. When the login is not root and sudo needs a password, live follow runs as the login user, which needs to be in the adm group (Debian, Ubuntu) to read the logs.
Read only hosts
Turn on Read only in the host settings to see sites, config and logs without any way to change them.