Welcome! Log In Create A New Profile

Advanced

Stub Status is not working

Posted by alfi 
Stub Status is not working
April 04, 2009 05:10PM
Hi.

I just make configuration like Jim Ohlstein suggested in my first [url=http://forum.nginx.org/read.php?5,706]topic[/url]. Nginx is working as a proxy for apache. I'm using [url=http://www.cacti.net]Cacti[/url] and I found a scripts for nginx: [url=http://forums.cacti.net/about26458.html]link[/url]. To make statistics I need Stub Status enable. So I went again to src nginx folder and type:
[code]
make claen
./configure --with-http_stub_status_module
make
make install
[/code]

[code]
objs/src/http/modules/ngx_http_browser_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_stub_status_module.o \
objs/ngx_modules.o \
-lcrypt -lpcre -lcrypto -lz
make[1]: Opuszczenie katalogu `/usr/src/nginx-0.7.47'
grzes@tessa:/usr/src/nginx-0.7.47# make install
make -f objs/Makefile install
make[1]: Wejście do katalogu `/usr/src/nginx-0.7.47'
test -d '/usr/local/nginx' || mkdir -p '/usr/local/nginx'
test -d '/usr/local/nginx/sbin' || mkdir -p '/usr/local/nginx/sbin'
test ! -f '/usr/local/nginx/sbin/nginx' || mv '/usr/local/nginx/sbin/nginx' '/usr/local/nginx/sbin/nginx.old'
cp objs/nginx '/usr/local/nginx/sbin/nginx'
test -d '/usr/local/nginx/conf' || mkdir -p '/usr/local/nginx/conf'
cp conf/koi-win '/usr/local/nginx/conf'
cp conf/koi-utf '/usr/local/nginx/conf'
cp conf/win-utf '/usr/local/nginx/conf'
test -f '/usr/local/nginx/conf/mime.types' || cp conf/mime.types '/usr/local/nginx/conf'
cp conf/mime.types '/usr/local/nginx/conf/mime.types.default'
test -f '/usr/local/nginx/conf/fastcgi_params' || cp conf/fastcgi_params '/usr/local/nginx/conf'
cp conf/fastcgi_params '/usr/local/nginx/conf/fastcgi_params.default'
test -f '/usr/local/nginx/conf/nginx.conf' || cp conf/nginx.conf '/usr/local/nginx/conf'
cp conf/nginx.conf '/usr/local/nginx/conf/nginx.conf.default'
test -d '/usr/local/nginx/logs' || mkdir -p '/usr/local/nginx/logs'
test -d '/usr/local/nginx/logs' || mkdir -p '/usr/local/nginx/logs'
test -d '/usr/local/nginx/html' || cp -r html '/usr/local/nginx'
test -d '/usr/local/nginx/logs' || mkdir -p '/usr/local/nginx/logs'
make[1]: Opuszczenie katalogu `/usr/src/nginx-0.7.47'
[/code]

I must add, that I allready have installed nginx, bat it's repleacing old one with new. As far as I know how to read. Also in make "ngx_http_stub_status_module.o" is in place, so.. everything should work fine. But when I add:

[code]
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
[/code]

nginx complain:

[code]
grzes@tessa:/usr/src/nginx-0.7.47# /etc/init.d/nginx restart
Restarting nginx: 2009/04/04 22:44:25 [emerg] 6272#0: unknown directive "stub_status" in /usr/local/nginx/conf/sites-enabled/danaans:35
[/code]

What I'm doing wrong?

Best Regards
alfi
Re: Stub Status is not working
April 04, 2009 05:18PM
Please post the output from:

# nginx -V

--
Jim Ohlstein
Re: Stub Status is not working
April 04, 2009 06:57PM
I have in polish sentence like that: the most darken place on the street is under the street lamp.

[code]
nginx version: nginx/0.7.47
configure arguments: --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module
[/code]

I reed to much how to in few days.. ^^, before, when I compile nginx at the first place and making init.d scripts I state location for sbin in /usr/local/sbin. Now, when I take little correction of the localization, everything is OK :). Thanks Jim for help.

Best Regards
alfi



Edited 1 time(s). Last edit at 04/04/2009 06:58PM by alfi.
Re: Stub Status is not working
April 04, 2009 08:13PM
There's a similar expression in English I believe.

It seems that your old executable is still installed as you can see from the configuration that you posted.

Try to stop nginx, then run make install again and start nginx again. See what happens.

--
Jim Ohlstein
Re: Stub Status is not working
April 05, 2009 04:56AM
Everything is working fine, now. When I configure nginx for a first time, I change sbin location to /urs/local/sbin. Later.. when I was trying to add Stub Status into nginx, I forgot to change sbin location while run ./configure, and nginx install to default localization /usr/local/nginx/sbin (or similar ^^). Because my init.d. scripts points to /usr/local/sbin/nginx not to /urs/local/nginx/sbin/nginx nothing change in nginx functionality ^^. Now I put everything in order, and works fine :).

[IMG]http://i252.photobucket.com/albums/hh27/atsukiPL/graph_imagephp.png[/IMG]
Re: Stub Status is not working
April 05, 2009 11:00AM
Great!

Now I hope the advice I gave you earlier works well for you. I think it will. :)

--
Jim Ohlstein
Re: Stub Status is not working
April 05, 2009 10:23PM
Yep, this command help my a lot, I noticed what I'm doing wrong :)

Best Regards
alfi
uri
Re: Stub Status is not working
April 30, 2011 06:49AM
Hi!
I have same problem.

/usr/local/nginx/sbin/nginx -V -t
nginx: nginx version: nginx/1.0.0
nginx: built by gcc 4.1.2 20080704 (Red Hat 4.1.2-48)
nginx: TLS SNI support disabled
nginx: configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_sub_module --with-http_perl_module --with-pcre=/usr/src/pcre-8.12
nginx: [emerg] unknown directive "stub_status" in /usr/local/nginx/conf/vhosts/somehost.conf:17
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

Any ideas?
Re: Stub Status is not working
May 25, 2011 09:59AM
Having a similar issue where I helped a coworker install a clean, newer version of Nginx than mine, and when I gave him my configuration file, this error message pops up. I find it strange that a newer version of nginx would have an issue with an older configuration file (he did not have Nginx on his machine before). I am using nginx/0.8.54 on OS X and it works flawlessly; my coworker is using, like uri, nginx/1.0.0. I will post -V info if anyone is still interested in this issue.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 149
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