You are not logged in.

#1 2013-05-27 18:19:14

Pacopag
Member
Registered: 2011-05-29
Posts: 287

Nginx in chroot isn't using port 80

Hi.  I followed the Nginx in a chroot instructions closely.  Everything seems to have worked, and the service starts and the whole bit.  But nothing is getting served...I get a "Webpage is not available".

The problem seems to be that nothing is using port 80.  If I start the default installation of nginx, I get this

$ sudo fuser -n tcp 80
80/tcp:              13274 13275 13276

But if I start the chrooted nginx, the service starts up fine, but "sudo fuser -n tcp 80" give no output at all.  Does that mean that the chrooted nginx isn't listening to the port?

Edit:  I was sure to do the setcap part, but it didn't help.

Last edited by Pacopag (2013-05-27 18:19:59)

Offline

#2 2013-05-28 03:38:34

Pacopag
Member
Registered: 2011-05-29
Posts: 287

Re: Nginx in chroot isn't using port 80

I just realized that I'm pretty sure that nginx isn't picking up the nginx.conf (and probably the sites-enabled) from the chroot.  I don't know where it is reading the conf from, but if I go into $JAIL/etc/nginx/nginx.conf and changes the "include /etc/nginx/sites-enabled/*" to "include /wtf/sites-enabled/*", I get not complaints about a bad config when I start the nginx service.  I think this means that it's not reading the conf, and not listening to any ports.

Offline

Board footer

Powered by FluxBB