Welcome! Log In Create A New Profile

Advanced

Re: Domains not working as expected with nginx

Francis Daly
July 08, 2022 07:52PM
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@daoine.org
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Domains not working as expected with nginx

the1gofer July 08, 2022 01:16PM

Re: Domains not working as expected with nginx

Francis Daly July 08, 2022 02:08PM

Re: Domains not working as expected with nginx

the1gofer July 08, 2022 03:56PM

Re: Domains not working as expected with nginx

Francis Daly July 08, 2022 07:52PM

Re: Domains not working as expected with nginx

Ian Hobson July 09, 2022 06:24AM

Re: Domains not working as expected with nginx

the1gofer July 11, 2022 10:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 77
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready