On Mon, Nov 7, 2016 at 11:20 AM, Peter Humphrey <pe...@prh.myzen.co.uk> 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