VHost Not Serving

Sergey A. Osokin osa at freebsd.org.ru
Mon Jun 28 23:27:49 UTC 2021


On Mon, Jun 28, 2021 at 07:20:36PM -0400, BeeRich Lists wrote:
> Ya that’s too many to report.  I have a catch-all with *.conf.  I can restrict
> it down to that main nginx.conf and the extra VHost.  
> 
> Same as I posted before.  Same result.  This has the main two in my nginx.conf,
> and the included one.  That last one has its own conf file:
> 
> include /opt/homebrew/etc/nginx/servers/alpha.conf;
> 
> Cheers, Bee

I can't reproduce the issue locally.  Here's the config:

server {
    listen 80 default_server;
    server_name hq3.local;
    return 200 "OK: hq3.local\n";
}

server {
    listen 80;
    server_name alpha.local;
    return 200 "OK: alpha.local\n";
}

And here's the requests:

% curl http://alpha.local
OK: alpha.local
% curl http://hq3.local
OK: hq3.local
% curl http://vp.local
OK: hq3.local

Last site is resolvable, but there's nothing in config about that one.

-- 
Sergey


More information about the nginx mailing list