I have a server providing 3 virtual hosts, peertube, books (bookwyrm) and snikket, running Debian Bookworm (nginx 1.22.1). The configurations are in /etc/nginx/sites-available and the active ones linked to from /etc/nginx/sites-enabled. All are effectively reverse proxies and running as close as I can get to the provided configurations for the respective services.
Peertube and books work happily together, and I have no configuration errors reported from snikket, but when I browse to it I get the site, and SSL certificate for books, and if I disable that then I get the site and certificate for peertube. If that too is disabled then Snikket works perfectly.
cat 01-snikket.conf
server {
# Accept HTTP connections
# listen 80;
listen 80 default_server;
listen [::]:80;
server_name snikket.paladyn.org
groups.snikket.paladyn.org
share.snikket.paladyn.org;
error_log /var/log/nginx/snikket-error.log;
access_log /var/log/nginx/snikket-access.log combined;
location / {
proxy_pass http://localhost:5080/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# This is the maximum size of uploaded files in Snikket
client_max_body_size 104857616; # 100MB + 16 bytes
}
}
server {
# Accept HTTPS connections
# listen [::]:443 ssl ipv6only=on;
# listen 443 ssl;
listen 443 ssl default_server;
ssl_certificate /etc/letsencrypt/live/snikket.paladyn.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/snikket.paladyn.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
server_name snikket.paladyn.org
groups.snikket.paladyn.org
share.snikket.paladyn.org;
location / {
proxy_pass https://localhost:5443/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# REMOVE THIS IF YOU CHANGE `localhost` TO ANYTHING ELSE ABOVE
proxy_ssl_verify off;
proxy_set_header X-Forwarded-Proto https;
proxy_ssl_server_name on;
# This is the maximum size of uploaded files in Snikket
client_max_body_size 104857616; # 100MB + 16 bytes
# For BOSH and WebSockets
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_read_timeout 900s;
}
}
I can’t see anything in this configuration which would cause it to be ignored unless the other sites are disabled. Happy to post the other site configurations if that would help, though they are basically taking the respective example configurations and change the domain names.