Skip to the guide

Configuring the services

Dashmox configures nginx, PHP, Postfix, Dovecot, the database and PostgreSQL from the panel, marks the settings that leave a server exposed, and checks each change with the service itself before anything takes it.

Where it is

Server, then the service.

Under Server, the Service settings group has a page for each: Nginx, PHP, Postfix, Dovecot, the database (headed MySQL or MariaDB, whichever this server was built on) and PostgreSQL. A service your server was installed without still has a page, and that page installs it: one button, which runs this server’s own installer and restarts the panel while it works. It says so before you press it, and it keeps asking while the panel is restarting rather than reporting a failure. Each shows what that service is currently using, not what a file somewhere says it should be using.

That distinction matters more than it sounds. A setting can be written correctly into a configuration file and ignored by the service that reads it, and the page tells you which of those you are looking at.

What is marked

The settings that leave a server exposed.

Some of these settings are ordinary tuning and some of them are the difference between a compromised website and a compromised server. The ones in the second group carry a warning and say what goes wrong, in a sentence rather than a category:

  • Reading files from the client in MySQL or MariaDB. A website with a SQL injection hole can be made to read files off the machine it runs on through this.
  • Following symbolic links in MySQL or MariaDB. With links followed, one customer's database file can be made to point at another's data.
  • Announcing the version in nginx and PHP. Knowing which release a server runs turns a published vulnerability into a targeted one.
  • Allowing programs to run from PHP. A website that can start processes is a website that can be turned into one.

The health page counts them, so a server nobody has looked at in a month still says how it is configured.

The reference

Every setting that has a safe value.

These are the ones with an answer rather than a preference. Everything else on the page is tuning, where the right value depends on what the server does.

ServiceSettingSafe valueWhat goes wrong otherwise
Nginx Advertise the nginx version off Every response names the exact version, which tells anybody scanning this server which published vulnerabilities to try first.
TLS versions accepted TLSv1.2 TLSv1.3 TLS 1.0 and 1.1 are withdrawn and unfixably weak. Accepting them protects nobody and fails the compliance scans a customer’s payment processor runs.
PHP Advertise the PHP version off Every response from every PHP website names the exact version, which is the first thing an automated scan reads.
Show errors to visitors off An error printed to a visitor carries the file path it happened in, and often the database name, the query and the credentials near it.
Session cookie hidden from scripts on A cross-site scripting hole becomes a stolen session rather than a defaced page.
Session cookie needs HTTPS on The session cookie travels in the clear on any plain request.
Postfix Encryption used when sending may Mail to a server that supports encryption goes in the clear.
TLS versions accepted SSLv2, SSLv3, TLS 1.0 and 1.1 excluded The same withdrawn protocols, on the mail port.
Refuse address verification yes The server will confirm whether an address exists, which is how address lists are harvested.
Require a HELO greeting yes Software too careless to greet properly is almost always sending spam.
Dovecot Refuse passwords without encryption yes A mail client configured carelessly sends its password in the clear.
Encryption required The whole mailbox session, messages included, can travel unencrypted.
Lowest TLS version TLSv1.2 As above, on the mail client ports.
MySQL or MariaDB Follow symbolic links 0 With links followed, one customer’s database file can be made to point at another’s data. Needs a restart.
PostgreSQL How passwords are stored scram-sha-256 The only other value PostgreSQL accepts is broken: a stolen password file can be turned back into passwords. Accounts made after a change are the ones affected.

Four of the settings on these pages need the service restarted rather than reloaded, because the service reads them only at startup: nginx’s domain name table size, and three of the database’s. The page says which before you press anything, because a reload that silently does nothing is worse than being told to expect a restart.

The two database engines are the ones to know about. MySQL and MariaDB have no way to reload at all, and PostgreSQL reads several of its settings only at startup and would apply the rest while silently ignoring those, so a change to either is a restart, and a restart means every website’s database is briefly unavailable. Do those when it suits you rather than at four in the afternoon.

Set these safely

One press for the ones that are not.

Rather than reading each warning and setting each switch, Set these safely puts every flagged setting on the service to its safe value at once. Each service is done on its own, so accepting the database's recommendations does not quietly change nginx as well.

Some of them need the service restarted, and the page says which before you press anything. The database engines are the ones to know about: MySQL and MariaDB have no way to reload, so their changes mean a restart, and a restart means every website's database is briefly unavailable.

Before it takes effect

The service is asked whether it will have it.

A configuration file that a service refuses is a service that does not come back. So nothing is applied on trust: the file is written, the service is asked to read it, and only a configuration it accepts is kept. A refusal puts the old file back and says what the service complained about, in its own words.

Since 0.97.17 there is a further check, and it is the one that matters. Writing a file, having the service accept it, and having the service restart are three things that can all succeed while nothing has changed, because a service that cannot read a file ignores it without saying so. The panel now reads the settings back afterwards and tells you about any that did not take, rather than reporting a save that had no effect.

What it does not touch

Your own configuration stays yours.

Dashmox writes its settings into a file of its own for each service, alongside whatever the distribution shipped and whatever you have added. It does not rewrite the main configuration, and it does not remove anything you put there.

The one exception is nginx, and it is explained where it happens: Ubuntu's own nginx.conf sets several of the same directives Dashmox offers, and nginx refuses a configuration that sets one twice. Where that collides, the duplicate in the distribution's file is commented out rather than deleted, marked so that anybody reading the file over SSH can see what happened and put it back.

If you edit by hand

The panel replaces its own file, not yours.

Editing the file Dashmox writes is temporary: the next save from the panel replaces it. Editing your own files is permanent, and the page will show you the result, because it reports what the service is using rather than what the panel last wrote.