Domains not working as expected with nginx
Francis Daly
francis at daoine.org
Fri Jul 8 23:50:33 UTC 2022
On Fri, Jul 08, 2022 at 12:53:39PM -0700, Jason Crews wrote:
Hi there,
Thanks for this.
I think it says that if you ask for "http://secondarydomain.com", you
will get to
> server {
> server_name secondarydomain.com;
that server block (unless secondarydomain.com resolves to 127.0.0.2);
but if you ask for "https://secondarydomain.com", you will get to
> server {
> listen 443 ssl http2;
> server_name sub.maindomain.com;
that server block.
Which I think is what you describe for the "wordpress" side of things.
Either configure a server block with ssl for secondarydomain.com;
or make sure to only access secondarydomain.com over http. (And if
something like wordpress redirects to https, make it stop doing that.)
Hope this helps,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list