The correct way to do that, IMHO, is chosing one of your domains as the main one and redirecting the others to it.
I'd do it first creating an HTML site in WO, for example:
wo site create domain.nl --html
Then you edit your vhost file in order to provide the redirect. You may use my example below (redirects .nl to .com):
## From: domain.nl
## To: domain.com
server {
server_name domain.nl www.domain.nl;
access_log /var/log/nginx/domain.nl.access.log ;
error_log /var/log/nginx/domain.nl.error.log;
root /var/www/domain.nl/htdocs;
index index.html index.htm;
location / {
try_files $uri @redirect;
}
location @redirect {
return 301 $scheme://domain.com$request_uri;
}
include /var/www/domain.nl/conf/nginx/*.conf;
include common/locations-wo.conf;
}
You'll be still able to add LE certificate to the origin domain, and if you wish something not to be redirected you just place the file inside htdocs
, as usual, because the @redirect
location will be triggered if and only if Nginx can't find the requested object in place.