What gets me asking is why the use of HA proxy configuration when this looks like a simple changes in the sites-available after re-reading this:
So they have a nginx site at 172.20.20.219
a hostname xxxx.yyy-zzzzzzz.de is entered into hosts in ipfire
so their default file in sites available should be:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name http://xxxx.yyy-zzzzzzz.de;
location / {
try_files $uri $uri/ =404;
}
}
There should be a new file created and I would name it aaweb and I would create it by going to the sites-available folder in a terminal as root and cp -p default aaweb
Then I would edit the new file aaweb for the site aaweb.yyyy-zzzzzzz.de
server {
listen 80;
server_name aaweb.yyyy-zzzzzzz.de;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name aaweb.yyyy-zzzzzzz.de;
ssl_certificate /path/to/aaweb.yyyy-zzzzzzz.de.crt;
ssl_certificate_key /path/to/aaweb.yyyy-zzzzzzz.de.key;
root /var/www/html/aaweb;
index index.html index.htm index.nginx-debian.html;
location / {
try_files $uri $uri/ =404;
}
}
Next, I would enable the site aaweb:
sudo ln -s sites-available/aaweb sites-enabled/
Then add aaweb.yyyy-zzzzzzz.de as a host entry in ipfire pointing to 172.20.20.219
Then if aaweb.yyyy-zzzzzzz.de is access http or https then its going to https://aaweb.yyyy-zzzzzzz.de
I think what they wanted to do is two sites at 172.20.20.219 but one is a http and another, a http by what they say.