Fix trailing space in `nginx_vhost.conf.master` at `server_name` property
Summary
Sometimes a trailing space in the server_name property causes nginx to listen to the website on all hosts, causing conflicts.
Steps to reproduce
- Create website without alias (
www., or*.)
Correct behaviour
If no website alias is specified, do not insert a trailing space.
Environment
Server OS + version: Ubuntu 24.04 ISPConfig version: 3.2.12p1
Software version of the related software: nginx/1.24.0
Proposed fix
Replace
server_name <tmpl_var name='domain'> <tmpl_var name='alias'>;
with
server_name <tmpl_var name='domain'><tmpl_if name='alias'> <tmpl_var name='alias'></tmpl_if>;
in nginx_vhost.conf.master template.