Unsubscribe

Aladdin Elston aelston at aerohive.com
Tue Dec 1 23:28:10 UTC 2015


Thank you, Aladdin








On 12/1/15, 4:00 AM, "nginx on behalf of nginx-request at nginx.org" <nginx-bounces at nginx.org on behalf of nginx-request at nginx.org> wrote:

>Send nginx mailing list submissions to
>	nginx at nginx.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>	http://mailman.nginx.org/mailman/listinfo/nginx
>or, via email, send a message with subject or body 'help' to
>	nginx-request at nginx.org
>
>You can reach the person managing the list at
>	nginx-owner at nginx.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of nginx digest..."
>
>
>Today's Topics:
>
>   1. Re: Basic auth is slow (Maxim Dounin)
>   2. Re: nginx and oracle weblogic server (itpp2012)
>   3. Re: 502 errors and request_time (Maxim Dounin)
>   4. Re: PHP and CGI on UserDir (Aleksandar Lazic)
>   5. Re: Basic auth is slow (Jo? ?d?m)
>   6. bind failed (Frank Liu)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Mon, 30 Nov 2015 16:12:10 +0300
>From: Maxim Dounin <mdounin at mdounin.ru>
>To: nginx at nginx.org
>Subject: Re: Basic auth is slow
>Message-ID: <20151130131210.GF74233 at mdounin.ru>
>Content-Type: text/plain; charset=utf-8
>
>Hello!
>
>On Sat, Nov 28, 2015 at 06:18:54PM +0100, Jo? ?d?m wrote:
>
>> Hi,
>> 
>> I just noticed that enabling basic authentication adds between 100 and
>> 150 ms to my otherwise 30-40 ms page load time. Is this known
>> behaviour? Is this somehow inherent or a design / implementation
>> mistake?
>
>Basic authentication checks user password on each request.  
>Depending on a password hash used for a particular user in the 
>user file, it may take significant time - as password hashes 
>are designed to be CPU-intensive to prevent password recovery 
>attacks.  Some additional information can be found here:
>
>https://en.wikipedia.org/wiki/Crypt_(C)
>
>Depending on your particular setup and possible risks, you may 
>consider using something less CPU-intensive as your password hash 
>function if a hash calculation takes 100ms.  All crypt(3) schemes 
>as supported by your system are understood by nginx, as well as 
>some additional schemes for portability and debugging.  See here 
>for more details:
>
>http://nginx.org/r/auth_basic_user_file
>
>-- 
>Maxim Dounin
>http://nginx.org/
>
>
>
>------------------------------
>
>Message: 2
>Date: Mon, 30 Nov 2015 08:52:30 -0500
>From: "itpp2012" <nginx-forum at nginx.us>
>To: nginx at nginx.org
>Subject: Re: nginx and oracle weblogic server
>Message-ID:
>	<6fee993a93365197b7da64b405034036.NginxMailingListEnglish at forum.nginx.org>
>	
>Content-Type: text/plain; charset=UTF-8
>
>Garcia Wrote:
>-------------------------------------------------------
>> Hi, 
>> Can Nginx work with oracle weblogic server properly? 
>
>As a proxy nginx can easily handle weblogic servers, interfacing (API) nginx
>with Oracle can be done with Lua.
>
>> Does Oracle have support for Nginx?
>
>It depends what kind of support you are looking for, ask Oracle to start
>with.
>
>Posted at Nginx Forum: https://forum.nginx.org/read.php?2,263159,263163#msg-263163
>
>
>
>------------------------------
>
>Message: 3
>Date: Mon, 30 Nov 2015 18:00:48 +0300
>From: Maxim Dounin <mdounin at mdounin.ru>
>To: nginx at nginx.org
>Subject: Re: 502 errors and request_time
>Message-ID: <20151130150048.GI74233 at mdounin.ru>
>Content-Type: text/plain; charset=us-ascii
>
>Hello!
>
>On Sat, Nov 28, 2015 at 03:02:33PM +0800, Shi wrote:
>
>> Hi:
>> 
>> I've found 2 kinds of 502 errors in my server:
>> 
>> connection reset by peer, it happens as request_time reach to 10s.
>> 
>> connection timeout, it happens as request_time reach to 3s.
>> 
>> Server is:
>> 
>> centos , kernel(2.6.32)
>> 
>> php5.2 php-fpm
>> 
>> nginx 1.6.3.
>> 
>> access logs outputs:
>> [28/Nov/2015:14:41:08 +0800] "GET /ben2.php HTTP/1.1" 502 172 "-" "Apache-HttpClient/4.2.6 (java 1.5)" "-" 3.000
>> 
>> [28/Nov/2015:14:41:11 +0800] "GET /ben2.php HTTP/1.1" 502 172 "-" "Apache-HttpClient/4.2.6 (java 1.5)" "-" 10.000
>> error logs:
>> 2015/11/28 14:41:11 [error] 12981#0: *798323 recv() failed (104:  Connection reset by peer) while reading response header from upstream,  client: xx.xx.xx.xx, server: xx.xx.xx, request: "GET /ben2.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xx.xx.xx"
>> 
>> 2015/11/28 14:41:08 [error] 12981#0: *798215 connect() failed (110: Connection timed out) while connecting to upstream, client: xx.xx.xx.xx, server: xx.xx.xx, request: "GET /ben2.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xx.xx.xx"
>> 
>> 
>> 
>> I've tried "request_terminate_timeout, fastcgi_connect_timeout, fastcgi_read/write_timeout", but no help.
>> 
>> What can I do next step ?
>
>The "connection reset by peer" means that the connection was 
>terminated by your backend, not by nginx.  There isn't much you 
>can do on nginx side.  Consider checking php-fpm logs instead, may 
>be you are hitting some limit like execution time limit or 
>something.
>
>The "connection timed out" means that nginx wasn't able to connect 
>to the backend in time, fastcgi_connection_timeout is something 
>you can tune - though the default is 60s, and it should be big 
>enough for normal use.  Again, consider looking into your backend 
>to find out why connection takes so long - likely it's overloaded 
>and can't process connection requests in time.
>
>-- 
>Maxim Dounin
>http://nginx.org/
>
>
>
>------------------------------
>
>Message: 4
>Date: Mon, 30 Nov 2015 17:47:16 +0100
>From: Aleksandar Lazic <al-nginx at none.at>
>To: Smart Goldman <ytlec2014 at gmail.com>
>Cc: nginx at nginx.org
>Subject: Re: PHP and CGI on UserDir
>Message-ID: <96697b73d09200e820ba5d685f4aaba6 at none.at>
>Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>Hi.
>
>Am 29-11-2015 12:02, schrieb Smart Goldman:
>> Hi, thank you for great help, Aleksandar Lazic.
>> I tried it.
>
>How looks now your config?
>
>> PHP script shows me "File not found." and outputs the following log:
>> 2015/11/29 05:50:15 [error] 5048#0: *6 FastCGI sent in stderr: "Primary
>> script unknown" while reading response header from upstream, client:
>> 119.105.136.26, server: localhost, request: "GET /~user/index.php
>> HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000 [2]", host:
>> "host.domain.com [4]"
>> 
>> - I do not know how to fix it...
>> 
>> CGI script shows me "Error: No such CGI app -
>> /home//public_html/~user/index.cgi may not exist or is not executable 
>> by
>> this process." and outputs nothing to error.log.
>> 
>> - /home//public_html/~user/... I think this path is wrong and I tried 
>> to
>> fix this path but I could not. /home/user/public_html/ should be 
>> correct
>> path..
>
>Please run the debug log to see more.
>
>http://nginx.org/en/docs/debugging_log.html
>
>Due to the fact that I don't know if you use the centos packes or the 
>nginx package I suggest to install the following packages
>
>http://nginx.org/en/linux_packages.html#mainline
>
>and the nginx-debug and run the debug instance with the suggested 
>settings in
>
>http://nginx.org/en/docs/debugging_log.html
>
>BR Aleks
>
>> 2015-11-29 18:41 GMT+09:00 Aleksandar Lazic <al-nginx at none.at>:
>> 
>>> Hi Smart Goldman.
>>> 
>>> Am 29-11-2015 09:04, schrieb Smart Goldman:
>>> 
>>>> Hello. I am new here.
>>>> 
>>>> I try to enable PHP and CGI(Perl) on UserDir
>>>> (/home/user/public_html)
>>>> with nginx.
>>>> But on my Chrome, PHP script is downloaded and CGI script shows me
>>>> "404
>>>> Not Found" page.
>>>> Here's my configurations. What is wrong with my configurations?
>>> 
>>> Try to use nested locations.
>>> 
>>> http://nginx.org/en/docs/http/ngx_http_core_module.html#location
>>> 
>>>> OS: Linux 3.10.0 / CentOS 7 64bit
>>>> nginx version: 1.8.0
>>>> 
>>>> ----------------------------------------------
>>>> /etc/nginx/conf.d/default.conf:
>>>> server {
>>>> listen       80;
>>>> server_name  localhost;
>>>> access_log  /var/log/nginx/access.log;
>>>> error_log   /var/log/nginx/error.log;
>>>> 
>>>> #charset koi8-r;
>>>> #access_log  /var/log/nginx/log/host.access.log  main;
>>>> 
>>>> location / {
>>>> root   /var/www/html;
>>>> index  index.html index.htm;
>>>> }
>>>> 
>>>> location ~ ^/~(.+?)(/.*)?$ {
>>>> alias /home/$1/public_html$2;
>>>> index  index.html index.htm;
>>>> autoindex on;
>>> 
>>> include my_php_config.conf;
>>> 
>>> include my_cgi_config.conf;
>>> 
>>>> }
>>>> 
>>>> #error_page  404              /404.html;
>>>> 
>>>> # redirect server error pages to the static page /50x.html
>>>> #
>>>> error_page   500 502 503 504  /50x.html;
>>>> location = /50x.html {
>>>> root   /var/www/html;
>>>> }
>>>> 
>>>> # proxy the PHP scripts to Apache listening on 127.0.0.1:80 [1]
>>>> [1]
>>>> #
>>>> #location ~ \.php$ {
>>>> #    proxy_pass   http://127.0.0.1;
>>>> #}
>>>> 
>>>> # pass the PHP scripts to FastCGI server listening on
>>>> 127.0.0.1:9000 [2]
>>>> [2]
>>>> #
>>>> #location ~ \.php$ {
>>>> #    root           html;
>>>> #    fastcgi_pass   127.0.0.1:9000 [2] [2];
>>>> #    fastcgi_index  index.php;
>>>> #    fastcgi_param  SCRIPT_FILENAME
>>>> /scripts$fastcgi_script_name;
>>>> #    include        fastcgi_params;
>>>> #}
>>>> 
>>>> location ~ (^~)*\.php$ {
>>>> root           /var/www/html;
>>>> fastcgi_pass   127.0.0.1:9000 [2] [2];
>>>> fastcgi_index  index.php;
>>>> fastcgi_param  SCRIPT_FILENAME
>>>> $document_root$fastcgi_script_name;
>>>> include        /etc/nginx/fastcgi_params;
>>>> }
>>>> location ~ (^~)*\.pl|cgi$ {
>>>> root           /var/www/html;
>>>> fastcgi_pass   127.0.0.1:8999 [3] [3];
>>>> fastcgi_index  index.cgi;
>>>> fastcgi_param  SCRIPT_FILENAME
>>>> $document_root$fastcgi_script_name;
>>>> include        /etc/nginx/fastcgi_params;
>>>> }
>>> 
>>> This block into "my_php_config.conf"
>>> 
>>>> location ~ .*~.*\.php$ {
>>>> alias /home/$1/public_html$2;
>>>> fastcgi_pass   127.0.0.1:9000 [2] [2];
>>>> fastcgi_index  index.php;
>>>> fastcgi_param  SCRIPT_FILENAME
>>>> $document_root$fastcgi_script_name;
>>>> include        /etc/nginx/fastcgi_params;
>>>> }
>>> END
>>> 
>>> This block into "my_cgi_config.conf"
>>> 
>>>> location ~ .*~.*\.pl|cgi$ {
>>>> alias /home/$1/public_html$2;
>>>> fastcgi_pass   127.0.0.1:8999 [3] [3];
>>>> fastcgi_index  index.cgi;
>>>> fastcgi_param  SCRIPT_FILENAME
>>>> $document_root$fastcgi_script_name;
>>>> include        /etc/nginx/fastcgi_params;
>>>> }
>>> 
>>> END
>>> 
>>>> # deny access to .htaccess files, if Apache's document root
>>>> # concurs with nginx's one
>>> 
>>> BR Aleks
>> 
>> 
>> 
>> Links:
>> ------
>> [1] http://127.0.0.1:80
>> [2] http://127.0.0.1:9000
>> [3] http://127.0.0.1:8999
>> [4] http://host.domain.com
>
>
>
>------------------------------
>
>Message: 5
>Date: Mon, 30 Nov 2015 23:03:05 +0100
>From: Jo? ?d?m <adam at jooadam.hu>
>To: nginx at nginx.org
>Subject: Re: Basic auth is slow
>Message-ID:
>	<CAKZ+miA1UOkueYNOuMcSt2uLgMU=a-qS4YE4mfMFqAWu6vS2Hw at mail.gmail.com>
>Content-Type: text/plain; charset=UTF-8
>
>Wow, I just realized how stupid my question was. I wasn?t considering
>the high iteration count I myself selected for hashing? Thanks, Maxim!
>
>?
>
>
>
>------------------------------
>
>Message: 6
>Date: Tue, 1 Dec 2015 00:49:50 -0800
>From: Frank Liu <gfrankliu at gmail.com>
>To: nginx at nginx.org
>Subject: bind failed
>Message-ID:
>	<CAOXPdC91ty7VRj=2b3vUdAuE8yOdS33_Wp+hP_RSHckX4JvTFA at mail.gmail.com>
>Content-Type: text/plain; charset="utf-8"
>
>Hi,
>
>I was doing some tests today and have created a single test virtual host
>with
>listen 8181;
>and nginx runs fine (1.9.7). Now if I change the listen to only one
>interface ip:
>listen 192.168.10.10:8181
>configtest shows fine but reload gives "bind failed" in the error log.
>Is this normal?
>
>Thanks!
>Frank
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151201/2c36ad38/attachment-0001.html>
>
>------------------------------
>
>Subject: Digest Footer
>
>_______________________________________________
>nginx mailing list
>nginx at nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx
>
>------------------------------
>
>End of nginx Digest, Vol 74, Issue 1
>************************************


More information about the nginx mailing list