server {
# bar
listen 172.104.227.123:443 ssl http2; # something
listen [::]:443 ssl;
server_name webmail.montferlandmarketing.nl mail.montferlandmarketing.nl;
root /var/lib/roundcube;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/webmail.montferlandmarketing.nl.log combined;
error_log /var/log/nginx/domains/webmail.montferlandmarketing.nl.error.log error;
#test
I don’t understand where its getting the http2 part from? Is it being added in? I’ve compared it to one of my other servers, and that correctly doesn’t have the http2 bit in - so why does this? The only difference with this one is that its apache + nginx, whereas the other one was nginx.
BTW the # comments are just so I could be sure it was building the template I thought it was
…it correctly rebuilds the template … with the exception of adding in http2 to the directive! I can see when doing a grep of hestia files, we have:
/usr/local/hestia/func/domain.sh
So maybe the nginx version is the issue, as I can see 1.25.1:
process_http2_directive() {
if [ -e /etc/nginx/conf.d/http2-directive.conf ]; then
while IFS= read -r old_param; do
new_param="$(echo "$old_param" | sed 's/\shttp2//')"
sed -i "s/$old_param/$new_param/" "$1"
done < <(grep -E "listen.*(\bssl\b(\s|.+){1,}\bhttp2\b|\bhttp2\b(\s|.+){1,}\bssl\b).*;" "$1")
else
if version_ge "$(nginx -v 2>&1 | cut -d'/' -f2)" "1.25.1"; then
echo "http2 on;" > /etc/nginx/conf.d/http2-directive.conf
while IFS= read -r old_param; do
new_param="$(echo "$old_param" | sed 's/\shttp2//')"
sed -i "s/$old_param/$new_param/" "$1"
done < <(grep -E "listen.*(\bssl\b(\s|.+){1,}\bhttp2\b|\bhttp2\b(\s|.+){1,}\bssl\b).*;" "$1")
else
listen_ssl="$(grep -E "listen.*\s\bssl\b(?:\s)*.*;" "$1")"
listen_http2="$(grep -E "listen.*(\bssl\b(\s|.+){1,}\bhttp2\b|\bhttp2\b(\s|.+){1,}\bssl\b).*;" "$1")"
if [ -n "$listen_ssl" ] && [ -z "$listen_http2" ]; then
while IFS= read -r old_param; do
new_param="$(echo "$old_param" | sed 's/\sssl/ ssl http2/')"
sed -i "s/$old_param/$new_param/" "$1"
done < <(grep -E "listen.*\s\bssl\b(?:\s)*.*;" "$1")
fi
fi
fi
}
So maybe it just needs nginx updated? The weird thing is, that both servers are running Hestia v1.8.11 , so I’m not sure why the one with the issue is still on nginx 1.25.0 ?
Yup. The problem is that its on nginx 1.25.0, and that change was brought in on 1.25.1 (or 2). So what it seems to be doing, is when it creates the domain part, it adds in the http2 part via a sed. Upgrading nginx to the latest fixed it