Forum: NGINX nginx-0.7.46

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-03-30 13:17
(Received via mailing list)
Changes with nginx 0.7.46                                        30 Mar
2009

    *) Bugfix: the previous release tarball was incorrect.
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2009-03-30 13:50
(Received via mailing list)
Hello!

On Mon, Mar 30, 2009 at 03:06:21PM +0400, Igor Sysoev wrote:

> Changes with nginx 0.7.46                                        30 Mar 2009
>
>     *) Bugfix: the previous release tarball was incorrect.

I've got the following under FreeBSD 6.2:

cd nginx
&& make
make -f objs/Makefile
gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wno-unused-function -Wunused-variable -Wunused-value -Werror -g
-D NGX_DEBUG_MALLOC -I src/core  -I src/event  -I
src/event/modules  -I src/os/unix  -I /usr/local/include  -I objs
-o objs/src/core/nginx.o  src/core/nginx.c
In file included from /usr/include/sys/mount.h:36,
                 from src/os/unix/ngx_freebsd_config.h:25,
                 from src/core/ngx_config.h:21,
                 from src/core/nginx.c:7:
/usr/include/sys/ucred.h:71: error: `NGROUPS' undeclared here (not
in a function)
*** Error code 1

Including sys/param.h before sys/mount.h as statfs() manpage
suggests fixes this issue, but then it dies with:

src/os/unix/ngx_files.c: In function `ngx_fs_bsize':
src/os/unix/ngx_files.c:444: error: storage size of 'fs' isn't known
src/os/unix/ngx_files.c:446: warning: implicit declaration of function
`statvfs'
src/os/unix/ngx_files.c:444: warning: unused variable `fs'
*** Error code 1

Including sys/statvfs.h as statvfs() manpage suggests fixes this
issue too.  With the following patch I was able to build it under
FreeBSD 6.2:

diff --git a/src/os/unix/ngx_freebsd_config.h
b/src/os/unix/ngx_freebsd_config.h
--- a/src/os/unix/ngx_freebsd_config.h
+++ b/src/os/unix/ngx_freebsd_config.h
@@ -22,7 +22,9 @@
 #include <grp.h>
 #include <dirent.h>
 #include <glob.h>
+#include <sys/param.h>
 #include <sys/mount.h>          /* statfs() */
+#include <sys/statvfs.h>

 #include <sys/filio.h>          /* FIONBIO */
 #include <sys/uio.h>


Maxim Dounin
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-03-30 14:33
(Received via mailing list)
Attachment: patch.freebsd4 (2 KB)
On Mon, Mar 30, 2009 at 03:43:19PM +0400, Maxim Dounin wrote:

> make -f objs/Makefile
> in a function)
>
>  #include <glob.h>
> +#include <sys/param.h>
>  #include <sys/mount.h>          /* statfs() */
> +#include <sys/statvfs.h>
>
>  #include <sys/filio.h>          /* FIONBIO */
>  #include <sys/uio.h>

The patch attached. The <sys/statvfs.h> is not needed on FreeBSD.
C47247911ad2634a2b102e17d0896659?d=identicon&s=25 Ruslan Malymon (ex_mac)
on 2009-03-30 19:55
Igor Sysoev wrote:
> On Mon, Mar 30, 2009 at 03:43:19PM +0400, Maxim Dounin wrote:
>
>> make -f objs/Makefile
>> in a function)
>>
>>  #include <glob.h>
>> +#include <sys/param.h>
>>  #include <sys/mount.h>          /* statfs() */
>> +#include <sys/statvfs.h>
>>
>>  #include <sys/filio.h>          /* FIONBIO */
>>  #include <sys/uio.h>
>
> The patch attached. The <sys/statvfs.h> is not needed on FreeBSD.

After patching:

make -f objs/Makefile
gcc -c -O -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core  -I src/event  -I src/event/modules  -I src/os/unix  -I ../pcre
-I objs  -o objs/src/os/unix/ngx_files.o  src/os/unix/ngx_files.c
src/os/unix/ngx_files.c: In function `ngx_fs_bsize':
src/os/unix/ngx_files.c:444: error: storage size of 'fs' isn't known
src/os/unix/ngx_files.c:446: warning: implicit declaration of function
`statvfs'
src/os/unix/ngx_files.c:444: warning: unused variable `fs'
*** Error code 1
C47247911ad2634a2b102e17d0896659?d=identicon&s=25 Ruslan Malymon (ex_mac)
on 2009-03-30 20:03
Sorry, all work.
Just need to re configure
2974d09ac2541e892966b762aad84943?d=identicon&s=25 adi (Guest)
on 2009-03-31 12:23
(Received via mailing list)
Hello

Do you have any roadmap / date when 0.7.x will be in stage "stable" for
"production use", and start 0.8.x  developer branch?

Good job, thank you very much!

Best regards.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,632,644#msg-644
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-03-31 13:16
(Received via mailing list)
On Mon, Mar 30, 2009 at 01:11:38PM -0400, adi wrote:

> Hello
>
> Do you have any roadmap / date when 0.7.x will be in stage "stable" for "production 
use", and start 0.8.x  developer branch?

I plan to improve cache during April and May, and then start 0.8.
103e3ecb1c838c6c7e52a0ee12ee6e1a?d=identicon&s=25 Glen Lumanau (Guest)
on 2009-04-01 05:00
(Received via mailing list)
I tried to install on Debian 5.0 server

But having an error shown bellow

In file included from src/http/ngx_http_file_cache.c:10:
src/core/ngx_md5.h:18:17: error: md5.h: No such file or directory
In file included from src/http/ngx_http_file_cache.c:10:
src/core/ngx_md5.h:22: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before ângx_md5_tâ
src/http/ngx_http_file_cache.c: In function
ângx_http_file_cache_create_keyâ:src/http/ngx_http_file_cache.c:135: error: 
ângx_md5_tâ undeclared (first use
in this function)
src/http/ngx_http_file_cache.c:135: error: (Each undeclared identifier
is
reported only once
src/http/ngx_http_file_cache.c:135: error: for each function it appears
in.)
src/http/ngx_http_file_cache.c:135: error: expected â;â before âmd5â
cc1: warnings being treated as errors
src/http/ngx_http_file_cache.c:143: error: implicit declaration of
function
âMD5Initâ
src/http/ngx_http_file_cache.c:143: error: âmd5â undeclared (first use in
this function)
src/http/ngx_http_file_cache.c:153: error: implicit declaration of
function
âMD5Updateâ
src/http/ngx_http_file_cache.c:160: error: implicit declaration of
function
âMD5Finalâ
make[1]: *** [objs/src/http/ngx_http_file_cache.o] Error 1
make[1]: Leaving directory `/root/nginx-0.7.46'
make: *** [build] Error 2
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 07:15
(Received via mailing list)
On Wed, Apr 01, 2009 at 09:49:52AM +0700, Glen Lumanau wrote:

> ?ngx_http_file_cache_create_key?:
> this function)
> src/http/ngx_http_file_cache.c:153: error: implicit declaration of function
> ?MD5Update?
> src/http/ngx_http_file_cache.c:160: error: implicit declaration of function
> ?MD5Final?
> make[1]: *** [objs/src/http/ngx_http_file_cache.o] Error 1
> make[1]: Leaving directory `/root/nginx-0.7.46'
> make: *** [build] Error 2

What does configure show ?
103e3ecb1c838c6c7e52a0ee12ee6e1a?d=identicon&s=25 Glen Lumanau (Guest)
on 2009-04-01 09:22
(Received via mailing list)
Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + md5 library is not found
  + sha1 library is not used
  + using system zlib library

  nginx path prefix: "/etc/nginx"
  nginx binary file: "/etc/nginx/sbin/nginx"
  nginx configuration prefix: "/etc/nginx/conf"
  nginx configuration file: "/etc/nginx/conf/nginx.conf"
  nginx pid file: "/etc/nginx/logs/nginx.pid"
  nginx error log file: "/etc/nginx/logs/error.log"
  nginx http access log file: "/etc/nginx/logs/access.log"
  nginx http client request body temporary files:
"/etc/nginx/client_body_temp"
  nginx http proxy temporary files: "/etc/nginx/proxy_temp"
  nginx http fastcgi temporary files: "/etc/nginx/fastcgi_temp"
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-04-01 09:35
(Received via mailing list)
When I compile on Ubuntu I see this:

Configuration summary
  + using system PCRE library
  + using OpenSSL library: /usr/lib
  + md5: using OpenSSL library
  + sha1 library is not used
  + using system zlib library

It appears you need the openssl libs. I don't know what it is in
debian but apt-cache search libssl. For example this is what I have:

libssl-dev
libssl0.9.8

I believe those should fix the issue.
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 09:35
(Received via mailing list)
On Wed, Apr 01, 2009 at 02:16:24PM +0700, Glen Lumanau wrote:

> Configuration summary
>   + using system PCRE library
>   + OpenSSL library is not used
>   + md5 library is not found
>   + sha1 library is not used
>   + using system zlib library

I meant the lines near

checking for rsaref md5 library ... not found
checking for rsaref md library ... found
checking for zlib library ... found
103e3ecb1c838c6c7e52a0ee12ee6e1a?d=identicon&s=25 Glen Lumanau (Guest)
on 2009-04-01 09:39
(Received via mailing list)
checking for statfs() ... found
checking for statvfs() ... found
checking for PCRE library ... found
checking for rsaref md5 library ... not found
checking for rsaref md library ... not found
checking for OpenSSL md5 crypto library ... not found
checking for zlib library ... found
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 09:48
(Received via mailing list)
On Wed, Apr 01, 2009 at 12:29:56AM -0700, Michael Shadle wrote:

> debian but apt-cache search libssl. For example this is what I have:
>
> libssl-dev
> libssl0.9.8
>
> I believe those should fix the issue.

Yes.

BTW are there in Linux standalone md5/sha libraries as in FreeBSD and
Solaris ?
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-04-01 09:58
(Received via mailing list)
2009/4/1 Igor Sysoev <is@rambler-co.ru>:

>> I believe those should fix the issue.
>
> Yes.
>
> BTW are there in Linux standalone md5/sha libraries as in FreeBSD and Solaris ?

No clue.

Doesn't look like it. Looks like it comes paired with openssl, or
beecrypt, or teamed up with the package requiring it (at least from my
scans of the apt cache)
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 10:04
(Received via mailing list)
On Wed, Apr 01, 2009 at 12:29:56AM -0700, Michael Shadle wrote:

> When I compile on Ubuntu I see this:
>
> Configuration summary
>   + using system PCRE library
>   + using OpenSSL library: /usr/lib

It should show
    + using system OpenSSL library

at least in my Debian test host.
How do you run configure ?
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-04-01 10:14
(Received via mailing list)
2009/4/1 Igor Sysoev <is@rambler-co.ru>:
>
> at least in my Debian test host.
> How do you run configure ?

./configure --conf-path=/etc/nginx/nginx.conf --prefix=/usr
--user=www-data --group=www-data \
--error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid
\
--lock-path=/var/lock/nginx.lock
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/lib/nginx/body
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--with-http_stub_status_module \
--with-openssl=/usr/lib --with-md5=/usr/lib
--with-http_gzip_static_module \
--without-mail_pop3_module --without-mail_smtp_module
--without-mail_imap_module \
--with-http_flv_module --with-http_ssl_module --with-http_dav_module
--with-http_realip_module --with-http_xslt_module \
--with-debug

i'm not sure the --with-openssl paths are needed anymore but it
continues to work great. i think even on (stupid) redhat with it's
mixed i386 and x86_64 libs
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 10:22
(Received via mailing list)
On Wed, Apr 01, 2009 at 01:07:50AM -0700, Michael Shadle wrote:

> > š š+ using system OpenSSL library
> --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-http_stub_status_module \
> --with-openssl=/usr/lib --with-md5=/usr/lib --with-http_gzip_static_module \
> --without-mail_pop3_module --without-mail_smtp_module
> --without-mail_imap_module \
> --with-http_flv_module --with-http_ssl_module --with-http_dav_module
> --with-http_realip_module --with-http_xslt_module \
> --with-debug
>
> i'm not sure the --with-openssl paths are needed anymore but it
> continues to work great. i think even on (stupid) redhat with it's
> mixed i386 and x86_64 libs

You do not need

 --with-openssl=/usr/lib
 --with-md5=/usr/lib

They are required only if you want to build OpenSSL or libmd5 from
sources,
but not if you want to use already built libraries. In the later case
nginx will find them by itself, or if they are in non-standard place,
you should help it by:

--with-cc-opt="-I /path/to/headers"
--with-ld-opt="-L /path/to/libraries"
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-04-01 11:22
(Received via mailing list)
2009/4/1 Igor Sysoev <is@rambler-co.ru>:

> --with-cc-opt="-I /path/to/headers"
> --with-ld-opt="-L /path/to/libraries"

I used this script for so long there may have been a bug in detecting
it or something at the time.

just took it out and

Configuration summary
  + using system PCRE library
  + using system OpenSSL library
  + md5: using OpenSSL library
  + sha1 library is not used
  + using system zlib library

seems to be good still. cool, thanks :)

Typically things do find libs properly on their own, I always try to
run it that way first. So for some reason along the way I wound up
having to force it.
103e3ecb1c838c6c7e52a0ee12ee6e1a?d=identicon&s=25 Glen Lumanau (Guest)
on 2009-04-01 11:24
(Received via mailing list)
Thank's. It fixed the problem :D
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 11:35
(Received via mailing list)
On Wed, Apr 01, 2009 at 12:50:53AM -0700, Michael Shadle wrote:

> Doesn't look like it. Looks like it comes paired with openssl, or
> beecrypt, or teamed up with the package requiring it (at least from my
> scans of the apt cache)

Thank you, beecrypt looks intresting, although its interface is
different
from OpenSSL/libmd's one.
F5a6ed477b109fe6acc11a5a8f87e7e8?d=identicon&s=25 Michael Shadle (Guest)
on 2009-04-01 12:24
(Received via mailing list)
2009/4/1 Igor Sysoev <is@rambler-co.ru>:

> Thank you, beecrypt looks intresting, although its interface is different
> from OpenSSL/libmd's one.

I don't know if it would be a good thing for nginx to require
something additional like it.

I'd rather see it leverage the standard openssl :)

BTW, did you take a look at my SSL error? I cannot determine what the
problem is. The only idea that I seem to have at the moment is during
peak usage periods, the issue comes up.

I get this:

2009/03/26 01:11:00 [info] 6523#0: *665 SSL_do_handshake() failed
(SSL: error:140943FC SL routines SL3_READ_BYTES slv3 alert bad record
mac) while SSL handshaking, client: 22.11.8.27, server:
bugzilla.foo.org
2009/03/26 01:11:00 [debug] 6523#0: *664 SSL handshake handler: 0
2009/03/26 01:11:00 [debug] 6523#0: *664 SSL_do_handshake: -1
2009/03/26 01:11:00 [info] 6523#0: *664 peer closed connection in SSL
handshake (104: Connection reset by peer) while SSL handshaking,
client: 22.11.8.27, server: bugzilla.foo.org

I can't find any workarounds on the net, it seems to be only with
Firefox 3.x.

Is there a tuneable or anything that would increase SSL performance or
available resources (the server is not highly utilized which is what
is weird...) that nginx can do, or could this be an openssl bug? It
seems like I found in nginx you recently had added those return values
of the "bad record mac" to the code, but I don't know -why- that is
happening, and only during specific periods of time, which is why I
think it is load related...

I've already done the ssl_protocols SSLv3 TLSv1; and that's fixed my
other servers and even other sites on the same server. It's this one
specific site and I've regenerated the SSL cert/etc...

It does proxy to apache, that's the only difference...

        server {
                listen 1.2.3.4:443;
                server_name bugzilla.foo.org;
                ssl on;
                ssl_certificate /etc/nginx/certs/bugzilla.foo.org.pem;
                ssl_certificate_key
/etc/nginx/certs/bugzilla.foo.org.key;
                ssl_protocols SSLv3 TLSv1;
                location / {
                        proxy_pass http://127.0.0.1:81/;
                        proxy_set_header Host $host;
                        proxy_set_header X-Forwarded-For $remote_addr;
                        proxy_pass_header Expires;
                        proxy_pass_header Server;
                        proxy_buffering off;
                }
        }

Any help is appreciated.
C7eee01ed22529853ac7c1a53e6bae9c?d=identicon&s=25 Otto Bretz (Guest)
on 2009-04-01 16:26
(Received via mailing list)
On Mon, Mar 30, 2009 at 1:43 PM, Maxim Dounin <mdounin@mdounin.ru>
wrote:
> /usr/include/sys/ucred.h:71: error: `NGROUPS' undeclared here (not
> in a function)

Same problem here on OpenBSD trying to compile 0.7.47
cc -c -O2 -pipe -I src/core  -I src/event  -I src/event/modules  -I
src/os/unix  -I /usr/local/include  -I objs  -o objs/src/core/nginx.o
src/core/nginx.c
In file included from /usr/include/sys/mount.h:40,
                 from src/os/unix/ngx_posix_config.h:48,
                 from src/core/ngx_config.h:41,
                 from src/core/nginx.c:7:
/usr/include/sys/ucred.h:46: error: `NGROUPS' undeclared here (not in
a function)

/Otto
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 16:30
(Received via mailing list)
On Wed, Apr 01, 2009 at 04:16:20PM +0200, Otto Bretz wrote:

> > š š š š š š š š from src/core/nginx.c:7:
>                  from src/core/nginx.c:7:
> /usr/include/sys/ucred.h:46: error: `NGROUPS' undeclared here (not in
> a function)

What does configure show ?
C7eee01ed22529853ac7c1a53e6bae9c?d=identicon&s=25 Otto Bretz (Guest)
on 2009-04-01 17:20
(Received via mailing list)
2009/4/1 Igor Sysoev <is@rambler-co.ru>:
> What does configure show ?

http://pastebin.com/m3ef8c583

/Otto
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-01 17:28
(Received via mailing list)
Attachment: patch.openbsd (452 Bytes)
On Wed, Apr 01, 2009 at 05:12:32PM +0200, Otto Bretz wrote:

> 2009/4/1 Igor Sysoev <is@rambler-co.ru>:
> > What does configure show ?
>
> http://pastebin.com/m3ef8c583

Try the attached patch.
C7eee01ed22529853ac7c1a53e6bae9c?d=identicon&s=25 Otto Bretz (Guest)
on 2009-04-01 18:31
(Received via mailing list)
2009/4/1 Igor Sysoev <is@rambler-co.ru>:
> Try the attached patch.

It works fine now.

Thanks!
This topic is locked and can not be replied to.