From devnexen at gmail.com Fri Jun 1 15:10:34 2018 From: devnexen at gmail.com (David CARLIER) Date: Fri, 1 Jun 2018 15:10:34 +0000 Subject: [PATCH] Proposal getentropy / nxt_random Message-ID: Hi, Here a little patch proposal to introduce getentropy to fill the buffer. Hope it is useful. Thanks. Kind regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nxt_random_getentropy.diff Type: text/x-patch Size: 1179 bytes Desc: not available URL: From vbart at nginx.com Thu Jun 7 16:06:12 2018 From: vbart at nginx.com (Valentin V. Bartenev) Date: Thu, 07 Jun 2018 19:06:12 +0300 Subject: Unit 1.2 release Message-ID: <5521191.08bFfdzhPU@vbart-workstation> Hello, I'm glad to announce a new release of NGINX Unit. Changes with Unit 1.2 07 Jun 2018 *) Feature: configuration of environment variables for application processes. *) Feature: customization of php.ini path. *) Feature: setting of individual PHP configuration options. *) Feature: configuration of execution arguments for Go applications. *) Bugfix: keep-alive connections might hang after reconfiguration. Here's an example of new configuration parameters of application objects: { "args-example": { "type": "go", "executable": "/path/to/compiled/go/binary", "arguments": ["arg1", "arg2", "arg3"] }, "opts-example": { "type": "php", "root": "/www/site", "script": "phpinfo.php", "options": { "file": "/path/to/php.ini", "admin": { "memory_limit": "256M", "variables_order": "EGPCS", "short_open_tag": "1" }, "user": { "display_errors": "0" } } }, "env-example": { "type": "python", "path": "/www/django", "module": "wsgi", "environment": { "DB_ENGINE": "django.db.backends.postgresql_psycopg2", "DB_NAME": "mydb", "DB_HOST": "127.0.0.1" } } } Please note that "environment" can be configured for any type of application. Binary Linux packages and Docker images are available here: - Packages: https://unit.nginx.org/installation/#precompiled-packages - Docker: https://hub.docker.com/r/nginx/unit/tags/ wbr, Valentin V. Bartenev From pcorralv at gmail.com Thu Jun 7 16:25:28 2018 From: pcorralv at gmail.com (Pedro Corral) Date: Thu, 7 Jun 2018 18:25:28 +0200 Subject: Installation of unit-php failed on Centos 7 Message-ID: how can I install unit-php on Centos 7? This what I obtain: Resolving Dependencies --> Running transaction check ---> Package unit-php.x86_64 0:1.2-1.el7.ngx will be installed --> Processing Dependency: libphp5-5.4.so()(64bit) for package: unit-php-1.2-1.el7.ngx.x86_64 --> Running transaction check ---> Package php-embedded.x86_64 0:5.4.16-45.el7 will be installed --> Processing Dependency: php-common(x86-64) = 5.4.16-45.el7 for package: php-embedded-5.4.16-45.el7.x86_64 --> Running transaction check ---> Package php-common.x86_64 0:5.4.16-45.el7 will be installed --> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-45.el7.x86_64 --> Running transaction check ---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed --> Processing Conflict: php56w-common-5.6.36-1.w7.x86_64 conflicts php-common < 5.6 --> Finished Dependency Resolution Error: php56w-common conflicts with php-common-5.4.16-45.el7.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest -------------- next part -------------- An HTML attachment was scrubbed... URL: From defan at nginx.com Thu Jun 7 16:40:36 2018 From: defan at nginx.com (Andrei Belov) Date: Thu, 7 Jun 2018 19:40:36 +0300 Subject: Installation of unit-php failed on Centos 7 In-Reply-To: References: Message-ID: <3E3EB4F2-70E5-4390-9A0C-F70D005CE31E@nginx.com> Hi Pedro, CentOS 7 provides PHP version 5.4 in default system repositories. You should remove "php56w-common" and maybe other php56 family packages and try again. (Currently we build Unit module packages with the only language versions available from default repositories of the particular OS.) Hope this helps. > On 07 Jun 2018, at 19:25, Pedro Corral wrote: > > how can I install unit-php on Centos 7? This what I obtain: > > Resolving Dependencies > --> Running transaction check > ---> Package unit-php.x86_64 0:1.2-1.el7.ngx will be installed > --> Processing Dependency: libphp5-5.4.so ()(64bit) for package: unit-php-1.2-1.el7.ngx.x86_64 > --> Running transaction check > ---> Package php-embedded.x86_64 0:5.4.16-45.el7 will be installed > --> Processing Dependency: php-common(x86-64) = 5.4.16-45.el7 for package: php-embedded-5.4.16-45.el7.x86_64 > --> Running transaction check > ---> Package php-common.x86_64 0:5.4.16-45.el7 will be installed > --> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-45.el7.x86_64 > --> Running transaction check > ---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed > --> Processing Conflict: php56w-common-5.6.36-1.w7.x86_64 conflicts php-common < 5.6 > --> Finished Dependency Resolution > Error: php56w-common conflicts with php-common-5.4.16-45.el7.x86_64 > You could try using --skip-broken to work around the problem > You could try running: rpm -Va --nofiles --nodigest > > _______________________________________________ > unit mailing list > unit at nginx.org > https://mailman.nginx.org/mailman/listinfo/unit -------------- next part -------------- An HTML attachment was scrubbed... URL: From vlad.kras at gmail.com Thu Jun 14 09:00:22 2018 From: vlad.kras at gmail.com (=?UTF-8?B?0JLQu9Cw0LQg0JrRgNCw0YE=?=) Date: Thu, 14 Jun 2018 12:00:22 +0300 Subject: Incorrect tags description on docker hub Message-ID: Tags described here https://hub.docker.com/r/nginx/unit/, e.g.: > "php" can run PHP scripts. do not exist. Full list of current version is 1.2-full 1.2-go1.7-dev 1.2-go1.8-dev 1.2-minimal 1.2-perl5.24 1.2-php7.0 1.2-python2.7 1.2-python3.5 1.2-ruby2.3 Regards, Vlad Kras -- ? ?????????, ?????????? ????. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick at nginx.com Thu Jun 14 16:25:13 2018 From: nick at nginx.com (Nick Shadrin) Date: Thu, 14 Jun 2018 09:25:13 -0700 Subject: Incorrect tags description on docker hub In-Reply-To: References: Message-ID: <2380E473-D5FB-423A-92D7-3190164A0371@nginx.com> Vlad, thank you for mentioning this. We changed the tags description appropriately. Please continue posting any inconsistencies in our documentation whenever you find them. -- Nick Shadrin / Sr. Product Manager / nick at nginx.com > On Jun 14, 2018, at 02:00, ???? ???? wrote: > > Tags described here https://hub.docker.com/r/nginx/unit/ , e.g.: > > "php" can run PHP scripts. > do not exist. Full list of current version is > > 1.2-full > 1.2-go1.7-dev > 1.2-go1.8-dev > 1.2-minimal > 1.2-perl5.24 > 1.2-php7.0 > 1.2-python2.7 > 1.2-python3.5 > 1.2-ruby2.3 > > Regards, > Vlad Kras > -- > ? ?????????, > ?????????? ????. > > _______________________________________________ > unit mailing list > unit at nginx.org > https://mailman.nginx.org/mailman/listinfo/unit -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.rodriguez11 at ymail.com Tue Jun 19 07:58:47 2018 From: tony.rodriguez11 at ymail.com (Antonio Rodriguez) Date: Tue, 19 Jun 2018 07:58:47 +0000 (UTC) Subject: Hi References: <940998653.2602215.1529395127358.ref@mail.yahoo.com> Message-ID: <940998653.2602215.1529395127358@mail.yahoo.com> Kj Sent from Yahoo Mail on Android -------------- next part -------------- An HTML attachment was scrubbed... URL: From ogarsylvanus73 at gmail.com Tue Jun 19 12:49:01 2018 From: ogarsylvanus73 at gmail.com (Sylvanus Ogar) Date: Tue, 19 Jun 2018 05:49:01 -0700 Subject: Hi In-Reply-To: <940998653.2602215.1529395127358@mail.yahoo.com> References: <940998653.2602215.1529395127358.ref@mail.yahoo.com> <940998653.2602215.1529395127358@mail.yahoo.com> Message-ID: Hi On Jun 19, 2018 08:58, "Antonio Rodriguez via unit" wrote: > > Kj > > Sent from Yahoo Mail on Android > > _______________________________________________ > unit mailing list > unit at nginx.org > https://mailman.nginx.org/mailman/listinfo/unit -------------- next part -------------- An HTML attachment was scrubbed... URL: From dorceanussandri23 at gmail.com Tue Jun 19 14:03:41 2018 From: dorceanussandri23 at gmail.com (sandri Agur) Date: Tue, 19 Jun 2018 21:03:41 +0700 Subject: Hi In-Reply-To: References: <940998653.2602215.1529395127358.ref@mail.yahoo.com> <940998653.2602215.1529395127358@mail.yahoo.com> Message-ID: Hello Pada tanggal Sel, 19 Jun 2018 19.49, Sylvanus Ogar menulis: > Hi > On Jun 19, 2018 08:58, "Antonio Rodriguez via unit" > wrote: > > > > Kj > > > > Sent from Yahoo Mail on Android > > > > _______________________________________________ > > unit mailing list > > unit at nginx.org > > https://mailman.nginx.org/mailman/listinfo/unit > _______________________________________________ > unit mailing list > unit at nginx.org > https://mailman.nginx.org/mailman/listinfo/unit -------------- next part -------------- An HTML attachment was scrubbed... URL: From danny at trisect.uk Wed Jun 20 18:57:03 2018 From: danny at trisect.uk (Danny Horne) Date: Wed, 20 Jun 2018 19:57:03 +0100 Subject: Multiple PHP sites need multiple listeners / applications? Message-ID: <16d19e84-96b3-a8db-7b79-87059d2f38ff@trisect.uk> Hi, I'm just starting out with Nginx Unit and have had limited success so far.? I run multiple sites, all as subdirectories under '/var/www' and all running PHP.? Do I need a separate listener and application for each site (even though they're all running PHP)? Thanks for looking From vbart at nginx.com Wed Jun 20 20:16:57 2018 From: vbart at nginx.com (Valentin V. Bartenev) Date: Wed, 20 Jun 2018 23:16:57 +0300 Subject: Multiple PHP sites need multiple listeners / applications? In-Reply-To: <16d19e84-96b3-a8db-7b79-87059d2f38ff@trisect.uk> References: <16d19e84-96b3-a8db-7b79-87059d2f38ff@trisect.uk> Message-ID: <764793067.6YWAhfW7ja@vbart-laptop> On Wednesday, 20 June 2018 21:57:03 MSK Danny Horne via unit wrote: > Hi, > > I'm just starting out with Nginx Unit and have had limited success so > far. I run multiple sites, all as subdirectories under '/var/www' and > all running PHP. Do I need a separate listener and application for each > site (even though they're all running PHP)? > > Thanks for looking > Since there are no routing feature implemented yet, so yes, currently you have to configure each site as a separate application. Request routing based on Host, URI, and any other request parameters is planned for this year. wbr, Valentin V. Bartenev From danny at trisect.uk Thu Jun 21 18:31:30 2018 From: danny at trisect.uk (Danny Horne) Date: Thu, 21 Jun 2018 19:31:30 +0100 Subject: Too many redirects error with Unit Message-ID: Hi, Previously I've been running Nginx + php-fpm on a Fedora 28 box, this has run fine.? For various reasons I want to migrate to Nginx + Unit, and because I haven't been able to install this on Fedora 28 (have no intention of compiling, install has to be through repos) I've set up a CentOS 7.5 box to migrate to. Static http / php pages work fine, but my sites redirect from http to https (config below) and I'm now getting 'too many redirects' errors. Any clues as to what I need to do to fix this? Relevant Nginx server block config - server { ??????? listen 80; ??????? listen [::]:80; ??????? server_name randomthoughts.trisect.uk; ??????? return 301 https://$server_name$request_uri; } server { ??????? listen 443 ssl http2; ??????? listen [::]:443 ssl http2; ??????? root /var/www/rt; ??????? index index.php; ??????? server_name randomthoughts.trisect.uk; ??????? location ~ \.php$ { ??????????????? proxy_pass http://unit_rt; ??????????????? proxy_set_header Host $host; ??????? } Relevant Nginx http block config - ??????? upstream unit_rt { ??????? server 127.0.0.1:8302; ??????? } Thanks for looking From vbart at nginx.com Thu Jun 21 18:49:21 2018 From: vbart at nginx.com (Valentin V. Bartenev) Date: Thu, 21 Jun 2018 21:49:21 +0300 Subject: Too many redirects error with Unit In-Reply-To: References: Message-ID: <2130814.UbmYXnXhRU@vbart-workstation> On Thursday 21 June 2018 19:31:30 Danny Horne via unit wrote: > Hi, > > Previously I've been running Nginx + php-fpm on a Fedora 28 box, this > has run fine. For various reasons I want to migrate to Nginx + Unit, > and because I haven't been able to install this on Fedora 28 (have no > intention of compiling, install has to be through repos) I've set up a > CentOS 7.5 box to migrate to. > > Static http / php pages work fine, but my sites redirect from http to > https (config below) and I'm now getting 'too many redirects' errors. > > Any clues as to what I need to do to fix this? > [..] It looks like that your php application try to redirect to https again and again. Usually such behaviour is configurable in widely used php applications and frameworks. What do you use? Is it some kind of cms? wbr, Valentin V. Bartenev From danny at trisect.uk Thu Jun 21 19:42:49 2018 From: danny at trisect.uk (Danny Horne) Date: Thu, 21 Jun 2018 20:42:49 +0100 Subject: Too many redirects error with Unit In-Reply-To: <2130814.UbmYXnXhRU@vbart-workstation> References: <2130814.UbmYXnXhRU@vbart-workstation> Message-ID: <593396f7-7812-2701-bab9-3b6293c181fb@trisect.uk> On 21/06/18 19:49, Valentin V. Bartenev wrote: > It looks like that your php application try to redirect to https again > and again. Usually such behaviour is configurable in widely used php > applications and frameworks. > > What do you use? Is it some kind of cms? > > wbr, Valentin V. Bartenev > > _______________________________________________ > Thanks for the reply.? I hadn't noticed, but a test site I set up with a phpinfo page to test Unit was configured to redirect to https in the same way, and that's working fine. All my sites run under Wordpress, so I think I need to look at that to find a solution From vbart at nginx.com Thu Jun 21 20:44:12 2018 From: vbart at nginx.com (Valentin V. Bartenev) Date: Thu, 21 Jun 2018 23:44:12 +0300 Subject: Too many redirects error with Unit In-Reply-To: <593396f7-7812-2701-bab9-3b6293c181fb@trisect.uk> References: <2130814.UbmYXnXhRU@vbart-workstation> <593396f7-7812-2701-bab9-3b6293c181fb@trisect.uk> Message-ID: <2995447.xOMY0qTPSA@vbart-laptop> On Thursday, 21 June 2018 22:42:49 MSK Danny Horne via unit wrote: > Thanks for the reply. I hadn't noticed, but a test site I set up with a > phpinfo page to test Unit was configured to redirect to https in the > same way, and that's working fine. > > All my sites run under Wordpress, so I think I need to look at that to > find a solution Your nginx configuration is fine. In this case it's not nginx causes redirection loop, but WordPress. In your case nginx receives request over https then proxies it to Unit using http. WordPress sees this request as http and tries to redirect to https (but it's already https between client and nginx). This repeats again and again. Please, try these steps: https://wordpress.stackexchange.com/questions/200053/disabling-https-redirection-for-migration wbr, Valentin V. Bartenev From danny at trisect.uk Thu Jun 28 14:32:41 2018 From: danny at trisect.uk (Danny Horne) Date: Thu, 28 Jun 2018 15:32:41 +0100 Subject: Install error Message-ID: <5e7fc192-d2ee-56ec-74cd-877e46fecb44@trisect.uk> Hi all, I'm trying to install from sources on Fedora 28.? I used Mercurial to download them (if that's important). configure, configure perl and configure php went well, as did make all. I get the following error when trying make install [root at hawking unit]# make install install -d sbin install -p build/unitd sbin/ install -d build install -d build install -p build/perl.unit.so \ ??????? build/ install: 'build/perl.unit.so' and 'build/perl.unit.so' are the same file make: *** [build/Makefile:1466: perl-install] Error 1 Thanks for looking From vbart at nginx.com Thu Jun 28 14:37:44 2018 From: vbart at nginx.com (Valentin V. Bartenev) Date: Thu, 28 Jun 2018 17:37:44 +0300 Subject: Install error In-Reply-To: <5e7fc192-d2ee-56ec-74cd-877e46fecb44@trisect.uk> References: <5e7fc192-d2ee-56ec-74cd-877e46fecb44@trisect.uk> Message-ID: <2294196.FlFlx6mai1@vbart-workstation> On Thursday 28 June 2018 15:32:41 Danny Horne via unit wrote: > Hi all, > > I'm trying to install from sources on Fedora 28. I used Mercurial to > download them (if that's important). > > configure, configure perl and configure php went well, as did make all. > > I get the following error when trying make install > > [root at hawking unit]# make install > install -d sbin > install -p build/unitd sbin/ > install -d build > install -d build > install -p build/perl.unit.so \ > build/ > install: 'build/perl.unit.so' and 'build/perl.unit.so' are the same file > make: *** [build/Makefile:1466: perl-install] Error 1 > > Thanks for looking > Please see here: https://github.com/nginx/unit/issues/136 In order to use "make install" you should configure install paths. wbr, Valentin V. Bartenev From danny at trisect.uk Thu Jun 28 15:09:13 2018 From: danny at trisect.uk (Danny Horne) Date: Thu, 28 Jun 2018 16:09:13 +0100 Subject: Install error In-Reply-To: <2294196.FlFlx6mai1@vbart-workstation> References: <5e7fc192-d2ee-56ec-74cd-877e46fecb44@trisect.uk> <2294196.FlFlx6mai1@vbart-workstation> Message-ID: <64792391-e4a6-7ab6-0f48-59cb830cdb41@trisect.uk> On 28/06/18 15:37, Valentin V. Bartenev wrote: > > Please see here: https://github.com/nginx/unit/issues/136 > > In order to use "make install" you should configure install paths. > > wbr, Valentin V. Bartenev > > Thanks, that's solved that problem.? I don't suppose you have any pointers to creating a systemd startup file? From vbart at nginx.com Thu Jun 28 15:20:16 2018 From: vbart at nginx.com (Valentin V. Bartenev) Date: Thu, 28 Jun 2018 18:20:16 +0300 Subject: Install error In-Reply-To: <64792391-e4a6-7ab6-0f48-59cb830cdb41@trisect.uk> References: <5e7fc192-d2ee-56ec-74cd-877e46fecb44@trisect.uk> <2294196.FlFlx6mai1@vbart-workstation> <64792391-e4a6-7ab6-0f48-59cb830cdb41@trisect.uk> Message-ID: <10484299.0QuIIn2xfj@vbart-workstation> On Thursday 28 June 2018 16:09:13 Danny Horne via unit wrote: > On 28/06/18 15:37, Valentin V. Bartenev wrote: > > > > Please see here: https://github.com/nginx/unit/issues/136 > > > > In order to use "make install" you should configure install paths. > > > > wbr, Valentin V. Bartenev > > > > > Thanks, that's solved that problem. I don't suppose you have any > pointers to creating a systemd startup file? [..] Everything related to building packages is inside pkg/ directory. You can get an example here: http://hg.nginx.org/unit/file/tip/pkg/rpm/rpmbuild/SOURCES/unit.service wbr, Valentin V. Bartenev From danny at trisect.uk Fri Jun 29 11:07:35 2018 From: danny at trisect.uk (Danny Horne) Date: Fri, 29 Jun 2018 12:07:35 +0100 Subject: One more question (I hope) Message-ID: <4f78aa2d-d4cd-df0b-d09c-48f938559df7@trisect.uk> Hi, I'm progressing well with Unit on Fedora 28, but I don't understand what's needed in my Perl application block with respect to "script" I want to run AWStats through Unit.? Using Perl 5.26.2 Thanks for looking From vbart at nginx.com Fri Jun 29 11:26:12 2018 From: vbart at nginx.com (Valentin V. Bartenev) Date: Fri, 29 Jun 2018 14:26:12 +0300 Subject: One more question (I hope) In-Reply-To: <4f78aa2d-d4cd-df0b-d09c-48f938559df7@trisect.uk> References: <4f78aa2d-d4cd-df0b-d09c-48f938559df7@trisect.uk> Message-ID: <5957854.H70xIs3hMb@vbart-workstation> On Friday 29 June 2018 12:07:35 Danny Horne via unit wrote: > Hi, > > I'm progressing well with Unit on Fedora 28, but I don't understand > what's needed in my Perl application block with respect to "script" > > I want to run AWStats through Unit. Using Perl 5.26.2 > > Thanks for looking > AWStats isn't really a web-application. It's a collection of Perl scripts supposed to be run from command line (usually it run periodically by a cron daemon). AWStats generates static html files that can be served by a web server, like nginx. The Unit Perl module is used to run web applications that supports generic PSGI specification. Bugzilla is a famous example of such application. The "script" option specifies a path to Perl script with PSGI compatible interface. This interface specifies how a Perl application should receive a request and how it should return a response. AWStats doesn't need that. See: https://plackperl.org/ wbr, Valentin V. Bartenev