Francis Daly
July 08, 2022 02:08PM
On Fri, Jul 08, 2022 at 10:14:13AM -0700, Jason Crews wrote:

Hi there,

> I'm not sure what I've got misconfigured here, I would appreciate
> anyone who could point me in the right direction.
> Site structure:
>
> maindomain.com -> mediawiki -> works
> sub.maindomain.com -> basic php website -> works
> secondarydomain.com -> wordpress -> goes to sub.maindomain.com
>
> I've posted all of the config files on reddit:
> https://www.reddit.com/r/nginx/comments/vtuha9/domains_not_going_where_expected/

For each server{} block that you have, what are the "listen" directives
and what are the "server_name" directives.

$ nginx -T | grep 'server\|listen'

will probably give a reasonable starting point for that data. Feel
free to edit it to hide anything you consider private; but please be
consistent. If you use the same IP address in the config twice, edit it
to the same thing. If you use different IP addresses, edit them to be
different things -- anything in the 10.x network is "private enough".

And for server_name entries, one.example.com, two.examle.com, and
*.example.net might be reasonable ways to edit thing.

(Also: feel free not to change things if you don't consider them private.)

And when you report something not working, please be specific about http
or https, to which particular hostname.

(And confirm whether the hostname resolves to the IP address that nginx
is listening on.)

Hopefully the answers to those will make it clear what is happening,
and what should be changed to make things happen the way you want them
to happen.

Cheers,

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: 159
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready