Re: [gentoo-user] How to get nginx serving pages?

2016-11-08 Thread Peter Humphrey
On Tuesday 08 Nov 2016 13:06:32 Alan McKinnon wrote:
> On 08/11/2016 10:48, Peter Humphrey wrote:
> > On Monday 07 Nov 2016 12:17:05 Poison BL. wrote:
> >> From the configuration in the aforementioned guide:
> >> 
> >> server {
> >> 
> >> listen 127.0.0.1;
> >> server_name localhost;
> >> 
> >> access_log /var/log/nginx/localhost.access_log main;
> >> error_log /var/log/nginx/localhost.error_log info;
> >> 
> >> root /var/www/localhost/htdocs;
> >> 
> >> }
> >> 
> >> This specifically instructs nginx to listen only on 127.0.0.1, so even
> >> connections from the same machine to its hostname or external IP
> >> address will not hit nginx there. You'll need to change the 'listen'
> >> value to determine what connections it should be answering. See the
> >> nginx documetation on that here:
> >> 
> >> http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
> >> 
> >> I would suspect for your internal network use-case, you'll want:
> >> listen *:80;
> > 
> > Yes, but for two things:
> > 
> > 1.  With links on the same host I specified http://localhost, and
> > localhost
> > resolves to 127.0.0.1.
> > 
> > 2.  I made the change you recommended and it didn't help.
> 
> you restarted nginx?

Yes, as I said just now. But I've just found I had an old alias for links in 
place. That's what snookered me. It's working okay now, I think.

Sorry about the noise.

-- 
Regards
Peter




Re: [gentoo-user] How to get nginx serving pages?

2016-11-08 Thread Peter Humphrey
On Tuesday 08 Nov 2016 13:06:32 Alan McKinnon wrote:
> On 08/11/2016 10:48, Peter Humphrey wrote:
> > On Monday 07 Nov 2016 12:17:05 Poison BL. wrote:
> >> From the configuration in the aforementioned guide:
> >> 
> >> server {
> >> 
> >> listen 127.0.0.1;
> >> server_name localhost;
> >> 
> >> access_log /var/log/nginx/localhost.access_log main;
> >> error_log /var/log/nginx/localhost.error_log info;
> >> 
> >> root /var/www/localhost/htdocs;
> >> 
> >> }
> >> 
> >> This specifically instructs nginx to listen only on 127.0.0.1, so even
> >> connections from the same machine to its hostname or external IP
> >> address will not hit nginx there. You'll need to change the 'listen'
> >> value to determine what connections it should be answering. See the
> >> nginx documetation on that here:
> >> 
> >> http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
> >> 
> >> I would suspect for your internal network use-case, you'll want:
> >> listen *:80;
> > 
> > Yes, but for two things:
> > 
> > 1.  With links on the same host I specified http://localhost, and
> > localhost
> > resolves to 127.0.0.1.
> > 
> > 2.  I made the change you recommended and it didn't help.
> 
> you restarted nginx?

First I sent it a reload signal; when that didn't help I restarted it.

-- 
Regards
Peter




Re: [gentoo-user] How to get nginx serving pages?

2016-11-08 Thread Alan McKinnon
On 08/11/2016 10:48, Peter Humphrey wrote:
> On Monday 07 Nov 2016 12:17:05 Poison BL. wrote:
> 
>> From the configuration in the aforementioned guide:
>>
>> server {
>> listen 127.0.0.1;
>> server_name localhost;
>>
>> access_log /var/log/nginx/localhost.access_log main;
>> error_log /var/log/nginx/localhost.error_log info;
>>
>> root /var/www/localhost/htdocs;
>> }
>>
>> This specifically instructs nginx to listen only on 127.0.0.1, so even
>> connections from the same machine to its hostname or external IP
>> address will not hit nginx there. You'll need to change the 'listen'
>> value to determine what connections it should be answering. See the
>> nginx documetation on that here:
>>
>> http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
>>
>> I would suspect for your internal network use-case, you'll want:
>>
>> listen *:80;
> 
> Yes, but for two things:
> 
> 1.  With links on the same host I specified http://localhost, and localhost 
> resolves to 127.0.0.1.
> 
> 2.  I made the change you recommended and it didn't help.
> 

you restarted nginx?


-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] How to get nginx serving pages?

2016-11-08 Thread Peter Humphrey
On Monday 07 Nov 2016 12:17:05 Poison BL. wrote:

> From the configuration in the aforementioned guide:
> 
> server {
> listen 127.0.0.1;
> server_name localhost;
> 
> access_log /var/log/nginx/localhost.access_log main;
> error_log /var/log/nginx/localhost.error_log info;
> 
> root /var/www/localhost/htdocs;
> }
> 
> This specifically instructs nginx to listen only on 127.0.0.1, so even
> connections from the same machine to its hostname or external IP
> address will not hit nginx there. You'll need to change the 'listen'
> value to determine what connections it should be answering. See the
> nginx documetation on that here:
> 
> http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
> 
> I would suspect for your internal network use-case, you'll want:
> 
> listen *:80;

Yes, but for two things:

1.  With links on the same host I specified http://localhost, and localhost 
resolves to 127.0.0.1.

2.  I made the change you recommended and it didn't help.

-- 
Regards
Peter




Re: [gentoo-user] How to get nginx serving pages?

2016-11-07 Thread Poison BL.
On Mon, Nov 7, 2016 at 11:20 AM, Peter Humphrey  wrote:
> Hello list,
>
> Several years ago I set up an apache2 web server to host a development site,
> and I had quite a struggle to get it all set up. Now I want to do it again,
> but I decided to try nginx instead. I've followed the instructions here:
>
> https://wiki.gentoo.org/wiki/Nginx
>
> ...but I get Connection Refused in www-client/links running on the same
> machine, or in Firefox over the LAN. I can run links as myself or as root,
> with the same result. But:
>
> $ curl http://localhost
> Hello, world!
>
> # netstat -tulpen | grep :80
> tcp  0  0 127.0.0.1:80  0.0.0.0:*  LISTEN  0  60680  19196/nginx: master
>
> # cat /var/log/nginx/error_log
> 2016/11/07 16:06:19 [notice] 19195#0: using the "epoll" event method
> 2016/11/07 16:06:19 [notice] 19195#0: nginx/1.10.1
> 2016/11/07 16:06:19 [notice] 19195#0: OS: Linux 4.4.26-gentoo
> 2016/11/07 16:06:19 [notice] 19195#0: getrlimit(RLIMIT_NOFILE): 1024:4096
> 2016/11/07 16:06:19 [notice] 19196#0: start worker processes
> 2016/11/07 16:06:19 [notice] 19196#0: start worker process 19197
>
> /etc/nginx/nginx.conf is untouched since installation.
>
> Shorewall isn't logging anything.
>
> What have I overlooked?
>
> --
> Regards
> Peter
>
>

>From the configuration in the aforementioned guide:

server {
listen 127.0.0.1;
server_name localhost;

access_log /var/log/nginx/localhost.access_log main;
error_log /var/log/nginx/localhost.error_log info;

root /var/www/localhost/htdocs;
}

This specifically instructs nginx to listen only on 127.0.0.1, so even
connections from the same machine to its hostname or external IP
address will not hit nginx there. You'll need to change the 'listen'
value to determine what connections it should be answering. See the
nginx documetation on that here:

http://nginx.org/en/docs/http/ngx_http_core_module.html#listen

I would suspect for your internal network use-case, you'll want:

listen *:80;

-- 
Poison [BLX]
Joshua M. Murphy