Welcome! Log In Create A New Profile

Advanced

Re: nginx default server not used

rj
February 20, 2012 01:41AM
Nginx User Wrote:
-------------------------------------------------------
> On 20 February 2012 00:17, rj
> <nginx-forum@nginx.us> wrote:
> > Hi Maxim,
> >
> > thank's for the quick reply. The config seems to
> be ok. The missing } is
> > most likely a copy/paste error when combining
> the different config files
> > for pastebin.
> >
> > I tried nginx -t already and it succeeds, so I
> assume the config is at
> > least syntactical correct.
> >
> > nginx: the configuration file
> /etc/nginx/nginx.conf syntax is ok
> > nginx: configuration file /etc/nginx/nginx.conf
> test is successful
> >
> > I also restarted and reloaded the config several
> times via
> > /etc/init.d/nginx {restart, reload, stop and
> start} without any
> > success.
> > Already checked the error log, unfortunately it
> is empty.
> > The server is running and working otherwise as
> expected. It serves
> > static and dynamic (php/ruby) content and also
> correctly passes requests
> > to a java tomcat server without any problems. I
> have no clue what could
> > trigger this odd behavior.
> > It seems all server configurations work
> correctly except for the default
> > config.
> >
> > Cheers,
> > rj
>
> As Maxim said, if you previously had a location
> and then removed it
> but you are still seeing vestiges of this, then it
> means one of the
> following:
>
> 1. You are still running the previous instance of
> Nginx.
> 2. You are still loading a conf file with the
> previous items in it.
>
> There is no other option.
>
> Since you say you have reloaded (assuming you
> don't have two instances
> of nginx going), then it has to be #2.
>
> So you have to look again at your setup carefully.
> Somewhere in there,
> you are loading something different from what you
> have been editing.
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Thanks, this was indeed the problem. I assumed that /etc/init.d/nginx {reload, restart, stop, start} worked, as I didn't get any error message saying otherwise. I also couldn't find anything in nginx or the syslogs regarding nginx, so didn't thought this might be the problem. After reading your suggestion I had a look at the running processes after "shutting down" nginx, and it was still running. So it seems this was the problem, although I don't know why.

I couldn't find anything in the logs why nginx was unable to start/stop or reload the config. The only difference after killing and restarting nginx, that I could find, was that passenger now is spawned as a separate process and not as a child process of nginx. So maybe that was the reason, but I'm just guessing.

Thanks for the hint in the right direction. I'm probably to used to apaches warnings when it cannot restart. Next time I'll check this first.
Subject Author Posted

nginx default server not used

rj February 19, 2012 02:23PM

Re: nginx default server not used

Maxim Dounin February 19, 2012 04:04PM

Re: nginx default server not used

rj February 19, 2012 04:17PM

Re: nginx default server not used

Nginx User February 19, 2012 05:14PM

Re: nginx default server not used

rj February 20, 2012 01:41AM

Re: nginx default server not used

valinor June 09, 2012 04:41AM

Re: nginx default server not used

Ruslan Ermilov June 13, 2012 02:14AM

Re: nginx default server not used

Edho Arief February 19, 2012 08:18PM

Re: nginx default server not used

rj February 20, 2012 01:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 250
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready