Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to get nginx serving pages?
Date: Tue, 08 Nov 2016 16:52:14
Message-Id: 3733635.nIqHemoDyZ@peak
In Reply to: Re: [gentoo-user] How to get nginx serving pages? by Alan McKinnon
1 On Tuesday 08 Nov 2016 13:06:32 Alan McKinnon wrote:
2 > On 08/11/2016 10:48, Peter Humphrey wrote:
3 > > On Monday 07 Nov 2016 12:17:05 Poison BL. wrote:
4 > >> From the configuration in the aforementioned guide:
5 > >>
6 > >> server {
7 > >>
8 > >> listen 127.0.0.1;
9 > >> server_name localhost;
10 > >>
11 > >> access_log /var/log/nginx/localhost.access_log main;
12 > >> error_log /var/log/nginx/localhost.error_log info;
13 > >>
14 > >> root /var/www/localhost/htdocs;
15 > >>
16 > >> }
17 > >>
18 > >> This specifically instructs nginx to listen only on 127.0.0.1, so even
19 > >> connections from the same machine to its hostname or external IP
20 > >> address will not hit nginx there. You'll need to change the 'listen'
21 > >> value to determine what connections it should be answering. See the
22 > >> nginx documetation on that here:
23 > >>
24 > >> http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
25 > >>
26 > >> I would suspect for your internal network use-case, you'll want:
27 > >> listen *:80;
28 > >
29 > > Yes, but for two things:
30 > >
31 > > 1. With links on the same host I specified http://localhost, and
32 > > localhost
33 > > resolves to 127.0.0.1.
34 > >
35 > > 2. I made the change you recommended and it didn't help.
36 >
37 > you restarted nginx?
38
39 First I sent it a reload signal; when that didn't help I restarted it.
40
41 --
42 Regards
43 Peter