Hello!
I'm using WordOps for long time. Each update, a particular headache about bind ports.
I have only one vps - and it will be only one, with 2x IPv4 and 2x IPv6 addresses.
In the next lines, 1ipv4, 1ipv6, 2ipv4 and 2ipv6, respectively to show the first and second stack use.
Well, I am using Netplan instead of ifconfig. Perfectly and run.
All entries A and AAAA works inside Cloudflare.
The 1st dual stack IP (1ipv4 + 1ipv6) I am using for Mailcow Dockerized with docker-compose.override.yml - works like a charm. Every address explicit, none of 0.0.0.0:port, 127.0.0.1:port or whatever.
The 2nd dual stack IP I am using for WordOps. It works fine for many months. Before last update and now I don't remember what I did - hellyeah! - to works. The default, 22222 and others domains ok.
Well, for each domain, I really need to set an explicit IPv6 and IPv4 - better to set 2ipv4 + 2ipv6 for NGINX, but I really do not know if a global variable environment could be it.
For example, for a domain abc.xyz at /etc/nginx/conf.d/force-ssl-abc.xyz.conf, I have tried:
server {
listen [2802:8ab0:0:5::5:1]:80 http2 ipv6only=on;
listen 195.105.45.105:80;
server_name abc.xyz *.abc.xyz;
return 301 https://$host$request_uri;
}
At /var/www/abc.xyz/conf/nginx/ssl.conf I have tried:
listen [2802:8ab0:0:5::5:1]:443 ssl http2 ipv6only=on;
listen 195.105.45.105:443 ssl http2;
ssl_certificate <all parameters... blabla>
The command sudo nginx -t bring me the following message:
nginx: [emerg] duplicate listen options for [2802:8ab0:0:5::5:1]:80 in /etc/nginx/conf.d/force-ssl-abc.xyz.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
What I'm doing wrong? What I need to fix? Well, I can't use the mask ( * ) with port, nor only port. Anyway, I have another external address using the same ports. What I need to do? Something inside /etc/sysctl.conf?
If I need IPv4 and IPv6 works slightly and explicit, how to do it?
Thank you very much.