Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all 7229 articles
Browse latest View live

performance using variables? (1 reply)

$
0
0
Hello List!

I got a question regarding performance of my nginx configuration files
using variables.
Will there be any slow LUA-runtime-parsing if I set a variable $phpuser
inside my server
block and use it afterwards in several common config files.

Q: Is this a performance disadvantage?

upstream php7_wpexpress_de {
server unix:/var/run/php7.0-fpm-wpexpress_de.sock;
}

server {
set $phpuser "wpexpress_de";

server_name wpexpress.dewww.wpexpress.de;

access_log /var/log/nginx/wpexpress.de.access.log rt_cache;
error_log /var/log/nginx/wpexpress.de.error.log;

root /var/www/wpexpress.de/htdocs;

index index.php index.html index.htm;

include common/redis-php7.conf;
include common/wpcommon-php7.conf;
include common/locations-php7.conf;
}

In the bottom (three) included config-files I subsequently use

fastcgi_pass php7_$phpuser;

because they do not distinguish per virtual host except for the
php-upstream.
Is this a good approach to separate php processors for each virtual host
or should
I do all configuration better static? Thank you in advance for any
helpfull information,

Ingo Baab, https://baab.de
______
I did read: http://nginx.org/en/docs/faq/variables_in_config.html and
also found guys suggesting a global var with nginx-config utilizing map:
http://stackoverflow.com/questions/14433309/how-to-define-a-global-variable-in-nginx-conf-file

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Rename log file based on its content (1 reply)

$
0
0
I want to know How can I do for to rename a log file in function to the
date of my log file ?
I known that in a log file I could find differents dates but I want to save
just the first date.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

You can speak at nginx conference this September in Portland. (no replies)

$
0
0
NGINX conference will be held in Portland, Oregon (USA) this September 6th-8th.

This is a highly technical event where you will join the most skilled professionals
in today's web technology, including the founders and core engineers of NGINX.

You are experienced in high performance, web tech, devops, and HTTP,
now please share your thoughts among your peers in this technology event.

Call for proposals is open now, and will be extended until May 25th.

Here's what you need:

Conference website: https://www.nginx.com/nginxconf https://www.nginx.com/nginxconf
Proposals submitted here: https://nginxconf17.busyconf.com/proposals/new https://nginxconf17.busyconf.com/proposals/new

Topics below are merely suggestions:

Architecture & Development

• Microservices-based applications
• Migrating to NGINX from hardware or other software solutions
• Auto-scaling systems and infrastructure
• IoT and embedded systems

High-Performance Web

• Architecture of high performance web apps
• Tuning of operating systems and network
• Caching, sharding, replication
• Storage and filesystems
• Reducing app latency

Operations & Deployment

• Adopting continuous integration and deployment
• Monitoring and observability of modern applications
• Configuration management
• Custom tooling/wiring examples built around NGINX to support CI/CD

Case Studies

• Insights and best practices from real-world deployments
• Running hybrid cloud and on-premises systems
• Organizational changes when adopting microservices
• Adopting containerization


--
Nick Shadrin / Product Manager / nick@nginx.com

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Limiting total disk space used by cache + temp files (1 reply)

$
0
0
Hi,

I'm trying to limit the overall disk usage for the cache + any temp files.

I have specified:
proxy_cache_path /tmp/cache max_size=50m use_temp_path=off;
proxy_max_temp_file_size 1m;

Yet, what I observe is that the temp file will grow to the full size of the file being retrieved from the upstream, ignoring the value of proxy_max_temp_file_size, and ignoring the max_size for the cache. Only after the file is brought over completely does the cache manager kick in and delete something older from the cache to bring it back in line with the 50mb limit.

For example, if I had in the cache file1 (20 MB) and file2 (20 MB), and I receive a request for file3 which is 20 MB, the total size of the /tmp/cache directory will grow to 60 MB. Only after file3 is received in its entirety will file1 be deleted bringing the size back down to 40 MB.

I don't mind setting use_temp_path=on, but in that case as well the temp file grows beyond the proxy_max_temp_file_size.

Any advice?

Michael

listen fastopen (2 replies)

$
0
0
Hello,
Does anybody know what this warning which i found in the docs http://nginx.org/en/docs/http/ngx_http_core_module.html#listen in the context of fastopen means?

"Do not enable this feature unless the server can handle receiving the same SYN packet with data more than once."

My kernel is 4.9.9 and cat /proc/sys/net/ipv4/tcp_fastopen is 3 so this feature is supported. Is this enought ?

Nginx access log / logrotate, tailing and td-agent (no replies)

$
0
0
Hi,

We are using td-agent to tail nginx logs and push them to s3 (every minute). We are rotating access logs every 10 minutes and we've noticed that when a log rotation happens log lines still go to the rotated log file for up to a minute after the rotation. Because of this we are losing some log lines when the rotation happens as td-agent follows the rotated log file for only 5 sec and then switches to the new one.

We checked the contents of the rotated gzs and during that first minute after the rotation not all log lines go to the rotated log file.. some go to the newly created access log (could be different workers?). Is this the expected behaviour? In our case we'll probably configure td-agent to tail the rotated log file for 60 seconds before switching to the new one but we are wondering if nginx behaves as expected.

The following postrotate script is used in logrotate config.

postrotate
[ ! -f /var/run/nginx.pid ] || /bin/kill -USR1 `cat /var/run/nginx.pid`
endscript

Regards,
Nik

Return Specific Error Page in NGinX when all the upstream servers are marked down (no replies)

$
0
0
I have an upstream block as follows

upstream sample{
server abc1.example.com down;
server abd2.example.com down;
}

Currently I get a 502 error. In this special case where I receive a 502 and all upstream servers are down I would like a receive a specific error page as temporarily unavailable.

How can i achieve that?

Nginx rewrite rules codeigniter (no replies)

$
0
0
I have an application in codeigniter.

This same application has a common code made in codeigniter and then
distributed in subdirectories each of which has a configuration, but
all pull the same common code.

The problem I have is that the application used to run in apache and
everything works correctly using the .htaccess.
Now I'm migrating the application to nginx and everything works fine
if we put the index.php
(eg http://baybay.es/ Farmaciacm / index.php / dashboard)
but if I remove it does not work.

I have tried several configurations in nginx but none solves the problem.

I would need someone with nginx knowledge to see if I applied a proper
configuration to be able to run the application without the index.php.
The structure I have of directories is: the project root is
in /home_datos/fisiotes/domains/baybay.es/public_html/
subdirectories are:
/ quadromandos / -> common code for all applications
(codeigniter, but only for code , Etc.)

/ farmaciacm / -> an application (here if there is an index.php)

/ farmaciacm1 / -> another application (here if there is an index.php)

In root there is no code, Everything is in subdirectories.

A greeting.


https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Libre
de virus. www.avast.com
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

geoip variables evaluation vs map (no replies)

$
0
0
Hello!
When using variables via map directive they are evaluated when they are used.
My question is if variables from geoip module like $geoip_country_code are evaluated only when they are used, like map or every time?

Issues with limit_req_zone. (no replies)

$
0
0
In limit_req_zone with rate set to 100/s and burst=50, we have below
observation
.
Scenario1
==========
no. of request made by jmeter = 170
# of request expected to be failing = 20
# of request actually failed = 23

Question: why 3 more request are failing and is this much of failure expected

Scenario2
==========
no. of request made by jmeter = 160
# of request expected to be failing = 10
# of request actually failed = 14

Question: why 4 more request are failing and is this much of failure expected

Scenario3
==========
no. of request made by jmeter = 145
# of request expected to be failing = 0
# of request actually failed = 4

Question: why 4 more request are failing when all expected to pass and is
this much of failure expected

Why is there a variation on the numbers than actual numbers specified. ?

Unix domain socket and restart (2 replies)

$
0
0
I started testing using a Unix domain socket so that I could a way to send a message when my site was down for maintenance but I ran into a problem. When I restarted nginx it complained that the sockets already existed and wouldn't start. Is this the expected behaviour?

/Michael Salmon
SE KI34 06 341C (OLC: 9FFVCX34+67Q8)
+46 722 184 909

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Docker client gets 405 error in nginx during docker push/pull (1 reply)

$
0
0
HI All,

Below is my issue, I have contacted artifactory support already and no much
help from them, if someone can help me with this, will be of great help.

Described my issue here.
https://github.com/docker/distribution/issues/2266

I have already tried to increase the nginx proxy timeout from default value
90 to 4000sec.

Now i have started getting the below error for that. (500 error) in Jenkins


*+ docker push 10.39.228.151:9000/controller-platform:1.3.1-int.4215
http://10.39.228.151:9000/controller-platform:1.3.1-int.4215*
*The push refers to a repository [10.39.228.151:9000/controller-platform
http://10.39.228.151:9000/controller-platform]*
*Error: Status 500 trying to push repository controller-platform:
"<html>\r\n<head><title>500 Internal Server Error</title></head>\r\n<body
bgcolor=\"white\">\r\n<center><h1>500 Internal Server
Error</h1></center>\r\n<hr><center>nginx/1.9.15</center>\r\n</body>\r\n</html>\r\n"*


Snippet from nginx error is as below,

*2017/04/26 20:18:22 [error] 7#7: *34966 open() "/etc/nginx/html/v1/_ping"
failed (2: No such file or directory), client: 10.40.210.70, server:
10.39.228.151, request: "GET /v1/_ping HTTP/1.1", host: "10.39.228.151:9000
http://10.39.228.151:9000/"*


*Thanks,*
*Syed*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

blank page cached ONLY for homepage URL on Wordpress when using keyword monitoring (no replies)

$
0
0
Hi all, new to this awesome community, and would greatly appreciate some help. I love Nginx but for months I've been trying to tackle a very strange issue where fastcgi is caching a blank page when monitoring tools like Monitis or Uptime Robot run keyword-based uptime monitors for the root URL only. In this case the site is http://musikandfilm.com. All child pages do not experience the blank page issue. It only occurs for http://musikandfilm.com. (However, child pages do sometimes intermittently get blank pages cached if I leave off the "/" at the end of the URL field in my monitor settings, so I think this may have something to do with the issue.)

When I delete the cached page and visit the homepage in my browser, I see fastcgi cache the page correctly. But when I delete the cached page and allow the monitors to hit the site first, a blank home page is cached that looks like the example below, even though I get a 200 response. I believe that the Monitors are requesting the homepage in a certain way that is causing fastcgi to cache the page incorrectly, but I don't know exactly what's happening. Here's an example of what's cached:


`^C^@^@^@^@^@^@^@<88>o^OY^@^@^@^@ÿÿÿÿÿÿÿÿxa^OY^@^@^@^@C\R^N^@^@¯^@á^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
KEY: httpGETmusikandfilm.com/
^A^F^@^A^@*^F^@Content-type: text/html; charset=UTF-8^M
^M`

And that's it, there's no body after this point as there would be if correctly cached.

I've been chasing this problem for so long I will gladly pay someone to fix this. I'm not even joking! I've checked my NGINX configs a hundred times at this point and followed all the recommendations from RT, NGINX, and elsewhere for NGINX+Wordpress setups, and I have failed thus far. I've spent at least 100 hours researching this, so if anyone is willing to help it would so so appreciated. I'm running Ubuntu 16.04, by the way. I'll post my NGINX configs below:

============================================
======= sites-available/default config: =======
============================================

#move next 4 lines to /etc/nginx/nginx.conf if you want to use fastcgi_cache across many sites
fastcgi_cache_path /var/www/html/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
#fastcgi_cache_key "$scheme$request_method$http_host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;

server {
listen 80;
listen [::]:80;

server_name musikandfilm.com www.musikandfilm.com;

access_log /var/log/nginx/musikandfilm.com.access.log;
error_log /var/log/nginx/musikandfilm.error.log;

root /var/www/html;
index index.php;

set $skip_cache 0;


# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
set $skip_cache 1;
}
if ($query_string != "") {
set $skip_cache 1;
}

# Don't cache uris containing the following segments
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}

# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}

autoindex off;

location ~ /purge(/.*) {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}


location ~* ^.+\.(flv|pdf|avi|mov|mp3|wmv|m4v|webm|aac|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
expires max;
log_not_found off;
access_log off;
}

location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ \.php$ {
try_files $uri /index.php;
include fastcgi_params;
include /etc/nginx/snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
if ($request_method = HEAD) {
set $skip_cache 1;
}
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 60m;
}

location ~* ^/wp-includes/.*(?<!(js/tinymce/wp-tinymce))\.php$ {
internal;
}

location = /favicon.ico {
log_not_found off;
access_log off;
}

location = /robots.txt {
access_log off;
log_not_found off;
}

location = /wp-config.php {
deny all;
}

location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}

location ~* ^/wp-content/.*\.(txt|md|exe|sh|bak|inc|php|pot|po|mo|log|sql)$ {
deny all;
}

location ~ /\.(ht|svn)? {
deny all;
}
}

============================================
======= /etc/nginx/nginx.conf =======
============================================

`user www-data;
worker_processes auto;
worker_rlimit_nofile 100000;
pid /run/nginx.pid;

events {
worker_connections 4096;
multi_accept on;
}

http {
##
# EasyEngine Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
types_hash_max_size 2048;

server_tokens off;
reset_timedout_connection on;
# add_header X-Powered-By "EasyEngine";
# add_header rt-Fastcgi-Cache $upstream_cache_status;

# Limit Request
limit_req_status 403;
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;

# Proxy Settings
# set_real_ip_from proxy-server-ip;
# real_ip_header X-Forwarded-For;

fastcgi_read_timeout 300;
client_max_body_size 100m;

##
# SSL Settings
##

ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

##
# Basic Settings
##
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

# Log format Settings
log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
'$http_host "$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component
text/xml
text/javascript;
##
# Cache Settings
##

fastcgi_cache_key "$scheme$request_method$http_host$request_uri";
#add_header Fastcgi-Cache $upstream_cache_status;
#add_header Fastcgi-method $request_method;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}`

============================================
======= fastcgi_params =======
============================================

fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param HOST $host;

#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;

fastcgi_param HTTPS $https;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

# To fix CGI application vulnerability - https://httpoxy.org
fastcgi_param HTTP_PROXY "";

============================================
======= fastcgi-php.conf =======
============================================

# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;

# Check that the PHP script exists before passing it
#try_files $fastcgi_script_name =404;

# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;

fastcgi_index index.php;
include fastcgi.conf;

upstream keepalive connections for all servers or each server? (no replies)

$
0
0
Hi

As known, the keepalive directive can activate the connections cache for upstream servers. I know the connection pool is in each worker process. But I'ms confused that the connection number is for each upstream server or is shared for all servers? It's documented at http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive

Thanks
Xiaofeng

NGINX stops redirecting (1 reply)

$
0
0
For some reason NGINX sometimes stops serving my tomcat pages and starts wanting to serve pages from .../nginx/html/.



I don't get it. On Friday, at 13:39, I was happily browsing my XWiki site, as you can see from the NGINX access_log. Then from that log you see no activity until 10:31 this morning, at which time it no longer wants to redirect hits to port 8080 or to /xwiki, it just wants to serve from its own html/ subdir.



When I come in this morning, When I go to hit the site NGINX shows me the placeholder page, .../nginx/html/index.html, which starts out "If you can see this page, ..."



I can still hit my xwiki at :8080/xwiki. It has not been restarted, altho so what if it had?

NGINX has not been restarted, and the config files (conf/nginx.conf, conf.d/tomcat.conf) have not changed.



Anybody else seen this? Why did it change behavior, and doe it have anything to do with the "signal process started" messages?



Thanks. Sorry if this is already discussed I just now koined the mailing list and will look thru the archives now.



NGINX Access log, showing a few hits to xwiki at 13:39 on 05/05, then non-redirected hits at 10:31-10:41 AM on 05/08

------------------

10.13.107.52 - - [05/May/2017:13:39:39 -0700] "GET /xwiki/bin/get/Portfolio%20Management/Project%20Budget/WebHome?outputSyntax=plain&sheet=XWiki.DocumentTree&showAttachments=false&showTranslations=false&&data=children&id=document%3Axwiki%3APortfolio+Management.WebHome HTTP/1.1" 200 1671 "http://dwswiki10.westmarine.net/xwiki/bin/view/Portfolio%20Management/Project%20Budget/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [05/May/2017:13:39:41 -0700] "GET /xwiki/bin/get/Portfolio%20Management/Project%20Budget/WebHome?outputSyntax=plain&sheet=XWiki.DocumentTree&showAttachments=false&showTranslations=false&&data=children&id=document%3Axwiki%3APortfolio+Management.Projects.WebHome HTTP/1.1" 200 1178 "http://dwswiki10.westmarine.net/xwiki/bin/view/Portfolio%20Management/Project%20Budget/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [05/May/2017:13:39:43 -0700] "GET /xwiki/bin/get/Portfolio%20Management/Project%20Budget/WebHome?outputSyntax=plain&sheet=XWiki.DocumentTree&showAttachments=false&showTranslations=false&&data=children&id=document%3Axwiki%3APortfolio+Management.Projects.Project+A.WebHome HTTP/1.1" 200 4330 "http://dwswiki10.westmarine.net/xwiki/bin/view/Portfolio%20Management/Project%20Budget/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [05/May/2017:13:39:45 -0700] "GET /xwiki/bin/get/Portfolio%20Management/Project%20Budget/WebHome?outputSyntax=plain&sheet=XWiki.DocumentTree&showAttachments=false&showTranslations=false&&data=children&id=document%3Axwiki%3APortfolio+Management.Projects.Project+A.Design.WebHome HTTP/1.1" 200 6935 "http://dwswiki10.westmarine.net/xwiki/bin/view/Portfolio%20Management/Project%20Budget/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [08/May/2017:10:30:44 -0700] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [08/May/2017:10:30:45 -0700] "GET /favicon.ico HTTP/1.1" 404 571 "http://dwswiki10/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [08/May/2017:10:31:27 -0700] "GET /xwiki HTTP/1.1" 404 571 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [08/May/2017:10:31:44 -0700] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [08/May/2017:10:31:44 -0700] "GET /favicon.ico HTTP/1.1" 404 571 "https://dwswiki10/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"

10.13.107.52 - - [08/May/2017:10:41:26 -0700] "GET / HTTP/1.1" 200 612 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)"

10.13.107.52 - - [08/May/2017:10:41:26 -0700] "GET /favicon.ico HTTP/1.1" 404 571 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)"

10.13.107.52 - - [08/May/2017:10:41:29 -0700] "GET / HTTP/1.1" 304 0 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)"

10.13.107.52 - - [08/May/2017:10:41:29 -0700] "GET /favicon.ico HTTP/1.1" 404 571 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)"







NGINX error log, showing some " signal process started" messages:

--------------------------------

2017/05/05 00:27:05 [error] 14431#0: *6148 open() "/data/nginx/html/servlet/admin" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /servlet/admin?category=server&method=listAll&Authorization=Digest+username%3D%22admin%22%2C+response%3D%22ae9f86d6beaa3f9ecb9a5b7e072a4138%22%2C+nonce%3D%222b089ba7985a883ab2eddcd3539a6c94%22%2C+realm%3D%22adminRealm%22%2C+uri%3D%22%2Fservlet%2Fadmin%22&service= HTTP/1.0"

2017/05/05 00:27:05 [error] 14431#0: *6152 open() "/data/nginx/html/servlet/admin" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /servlet/admin?category=server&method=listAll&Authorization=Digest+username%3D%22admin%22%2C+response%3D%22ae9f86d6beaa3f9ecb9a5b7e072a4138%22%2C+nonce%3D%222b089ba7985a883ab2eddcd3539a6c94%22%2C+realm%3D%22adminRealm%22%2C+uri%3D%22%2Fservlet%2Fadmin%22&service= HTTP/1.0"

2017/05/05 00:27:05 [error] 14431#0: *6156 "/data/nginx/html/HTTP1.0/index.html" is not found (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /HTTP1.0/"

2017/05/05 00:27:12 [error] 14431#0: *6443 open() "/data/nginx/html/home.htm" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /home.htm HTTP/1.1", host: "10.13.4.247"

2017/05/05 00:27:16 [error] 14431#0: *6550 open() "/data/nginx/html/spipe" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "POST /spipe?Source=nessus HTTP/1.0"

2017/05/05 00:27:16 [error] 14431#0: *6552 open() "/data/nginx/html/spipe" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "POST /spipe?Source=nessus HTTP/1.0"

2017/05/05 00:27:20 [error] 14431#0: *6661 open() "/data/nginx/html/logout" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /logout HTTP/1.0"

2017/05/05 00:27:20 [error] 14431#0: *6668 open() "/data/nginx/html/logout" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /logout HTTP/1.0"

2017/05/05 00:27:22 [error] 14431#0: *6752 open() "/data/nginx/html/yYWiy2DH.asp" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET //yYWiy2DH.asp HTTP/1.0"

2017/05/05 00:27:22 [error] 14431#0: *6757 open() "/data/nginx/html/tnq0ObbP.asp" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET //tnq0ObbP.asp HTTP/1.0"

2017/05/05 00:27:25 [error] 14431#0: *6882 open() "/data/nginx/html/content/YmEIoHwZQ6.mp3" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /content/YmEIoHwZQ6.mp3 HTTP/1.0"

2017/05/05 00:27:25 [error] 14431#0: *6885 open() "/data/nginx/html/content/YmEIoHwZQ6.mp3" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /content/YmEIoHwZQ6.mp3 HTTP/1.0"

2017/05/05 00:27:46 [error] 14431#0: *7313 open() "/data/nginx/html/iControl/iControlPortal.cgi" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "POST http://127.0.0.1/iControl/iControlPortal.cgi HTTP/1.1", host: "dwswiki10.westmarine.net"

2017/05/05 00:27:46 [error] 14431#0: *7315 open() "/data/nginx/html/iControl/iControlPortal.cgi" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "POST http://127.0.0.1/iControl/iControlPortal.cgi HTTP/1.1", host: "dwswiki10.westmarine.net"

2017/05/05 00:27:47 [error] 14431#0: *7342 open() "/data/nginx/html/.anydomain.test" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /.anydomain.test HTTP/1.0"

2017/05/05 00:27:47 [error] 14431#0: *7343 open() "/data/nginx/html/.anydomain.test" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /.anydomain.test HTTP/1.0"

2017/05/05 00:27:47 [error] 14431#0: *7345 open() "/data/nginx/html/index.jsp" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /index.jsp HTTP/1.1", host: "sjfklsjfkldfjklsdfjdlksjfdsljk.foo."

2017/05/05 00:27:48 [error] 14431#0: *7351 open() "/data/nginx/html/index.jsp" failed (2: No such file or directory), client: 10.13.122.42, server: localhost, request: "GET /index.jsp HTTP/1.1", host: "sjfklsjfkldfjklsdfjdlksjfdsljk.foo."

2017/05/05 00:27:50 [crit] 14431#0: *7396 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:SSL3_READ_BYTES:ccs received early) while SSL handshaking, client: 10.13.122.42, server: 0.0.0.0:443

2017/05/05 00:27:50 [crit] 14431#0: *7397 SSL_do_handshake() failed (SSL: error:05066066:Diffie-Hellman routines:COMPUTE_KEY:invalid public key error:1408B005:SSL routines:SSL3_GET_CLIENT_KEY_EXCHANGE:DH lib) while SSL handshaking, client: 10.13.122.42, server: 0.0.0.0:443

2017/05/05 10:40:33 [notice] 20325#0: signal process started

2017/05/05 10:41:12 [notice] 20357#0: signal process started

2017/05/05 10:43:18 [notice] 20416#0: signal process started

2017/05/05 12:59:34 [notice] 23321#0: signal process started

2017/05/08 10:30:45 [error] 23325#0: *132 open() "/data/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.13.107.52, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "dwswiki10", referrer: "http://dwswiki10/"

2017/05/08 10:31:27 [error] 23325#0: *132 open() "/data/nginx/html/xwiki" failed (2: No such file or directory), client: 10.13.107.52, server: localhost, request: "GET /xwiki HTTP/1.1", host: "dwswiki10"

2017/05/08 10:31:44 [error] 23325#0: *140 open() "/data/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.13.107.52, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "dwswiki10", referrer: "https://dwswiki10/"

2017/05/08 10:40:43 [notice] 16545#0: signal process started

2017/05/08 10:41:26 [error] 16566#0: *1 open() "/data/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.13.107.52, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "dwswiki10"

2017/05/08 10:41:29 [error] 16566#0: *1 open() "/data/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.13.107.52, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "dwswiki10"

2017/05/08 10:42:26 [notice] 16651#0: signal process started



My conf/nginx.conf:
[root@dwswiki10 conf]# more nginx.conf

#user nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
}

#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 html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
server {
listen 443 ssl;
server_name localhost;

ssl_certificate /data/nginx/keys/dwswiki10.westmarine.net.pem;
ssl_certificate_key /data/nginx/keys/dwswiki10.westmarine.net.key;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;

ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

location / {
root html;
index index.html index.htm;
}
}
include ../conf.d/*.conf;
}





My nginx/conf.d/tomcat.conf:
[root@dwswiki10 nginx]# cat conf.d/tomcat.conf
server {
listen 80;
server_name dwswiki10.westmarine.net;
# Root to the XWiki application
root /data/tomcat/webapps/xwiki;

location / {
#All "root" requests will have /xwiki appended AND redirected to mydomain.com again
rewrite ^ $scheme://$server_name/xwiki$request_uri? permanent;
}

location ^~ /xwiki {
# If path starts with /xwiki - then redirect to backend: XWiki application in Tomcat
# Read more about proxy_pass: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 443;
server_name dwswiki10.westmarine.net;
# Root to the XWiki application
root /data/tomcat/webapps/xwiki;

location / {
#All "root" requests will have /xwiki appended AND redirected to mydomain.com again
rewrite ^ $scheme://$server_name/xwiki$request_uri? permanent;
}

location ^~ /xwiki {
# If path starts with /xwiki - then redirect to backend: XWiki application in Tomcat
# Read more about proxy_pass: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
}

}







The information contained in this transmission may contain West Marine proprietary, confidential and/or privileged
information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are
hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited.
If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original
message. To reply to our email administrator directly, please send an email to netadmin@westmarine.com.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Can you migrate a web app available via '/' to a proxied sub-URI without modifying the web app? (no replies)

$
0
0
Hi,

Thanks for reading this.

My apologies if this has been answered before, but after much reading
(official docs, mailing list discussions, etc.) I'm still not completely
clear on whether this is supported. I know it's a hangup on my part, but
I've not managed to get past the stumbling point yet.

#1) Have a web app answer to https://subdomain.example.com/ with app
related urls like '/login', '/issues', and requests for static resources
with URL paths like '/static/styles.css'. The app runs on localhost at
http://127.0.0.1:3000 and is proxied by nginx with a direct mapping of
http://subdomain.example.com/ to http://127.0.0.1:3000/ and it works
well. As indicated, this setup does not use a sub-URI, but treats '/' as
its root URL path.

#2) I'd like to move the web application to
https://subdomain.example.com/sub-uri/ by setting up location block like
so (spacing condensed for display purposes):

location /flask-demo {
root /var/www/passenger-python-flask-demo;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_pass http://127.0.0.1:3000/;
}

The trailing slash was added in an attempt to map /flask-demo/SOMETHING
to /SOMETHING in the application's point of view.

That works well for a test web app where everything is contained in a
single file, but when the static assets are referenced by the HTML
output the user's browser attempts to pull static content from '/'
instead of '/flask-demo/'.

I've found that for this and other web applications (demo and
production) that I've tested thus you can configure the base URL in the
web application itself.

Does nginx support redirecting those requests for static resources
requests to the associated sub-URI without modifying the web
application? If it was only one web application I could setup location
blocks for specific patterns, but if I plan on running multiple web
applications on a single FQDN (perhaps even different instances of the
same web app), each in a separate sub-URI, those web applications might
all make requests to '/static/styles.css' based on their original
configuration.

I'm hoping there is a way to isolate each web application based on the
initial location block match, thereby catching follow-up requests for
static resources related to the first request and prepend the sub-URI.
Thus a request for '/static/styles.css' becomes
'/flask-demo/static/styles.css' if I visit '/flask-demo' and if I visit
'/other-app' the static request becomes '/other-app/static/styles.css',
all without modifying the web application to know it is being run from a
sub-URI.

I assume the answer is "no, this is not supported", but I wanted to ask
just to make sure I'm not overlooking something. Francis Daly's remarks
on the "URL-Rewriting not working" thread that I've quoted from below
seems to suggest it might be possible, but probably isn't worth the
headache:

> Note that if you want to reverse-proxy a back-end web
> service at a different part of the url hierarchy to
> where it believes it is installed, in general you need
> the web service to help.
>
> That is, if you want the back-end / to correspond to
> the front-end /x/, then if the back-end ever links to
> something like /a, you will need that to become
> translated to /x/a before it leaves the front-end. In
> general, the front-end cannot do that translation.
>
> So you may find it easier to configure the back-end to
> be (or to act as if it is) installed below /x/ directly.
>
> Otherwise things can go wrong.

I found the 'proxy_redirect' directive, but it doesn't appear to do what
I'm looking for. Instead, it appears to be designed specifically to do
things like prevent having the client access http://127.0.0.1:3000/
instead of http://127.0.0.1:80/ (as is shown in my example).

I've used nginx for years, but only in very basic configurations. This
is something new to me and I'm struggling to wrap my head around it.
Thank you for reading this and any advice you can offer.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Can I secure SOAP web services using NGINX API Gateway ? (no replies)

$
0
0
Hi,

I need to know that

How to secure SOAP web services using NGINX's API gateway feature ?

** Current Implementation **

I have an application with rest interfaces and is secured by NGINX's AUTH_REQUEST module. For each request reaching NGINX,
AUTH_REQUEST sends a SubRequest to /login to the auth applicaiton which returns 200 OK if the credentials are correct and the user is
authorized to login.


** Question **

In the same application we have created SOAP web services and need WS-Security to secure the services. We want to use the NGINX to perform WS-Security authentication for SOAP web services also like the way its doing it for RESTful services. But the issue is sending a subrequest to /login which is written to handle RESTful service calls. And in SOAP services our design is to have client certificate authentication, so how can Nginx handle Ws-Sescurity for SOAP services.

proxy_upstream_next while no live upstreams (no replies)

$
0
0
Hi all,

I have an upstream configure with Nginx 1.8.1 :

upstream test {
server 192.168.0.5;
server 192.168.0.6;
}

Question 1:
Assume both of the 2 servers are down.
First request tries both of them and fails, and response 502. Nginx marks both of them as DOWN. This is OK.
Second request comes and finds there is no live upstreams, then Nginx resets both of servers as UP, logs "no live upstreams", and returns 502.
My question is that in the second request, nginx dose NOT try the 2 servers, but just return 502 immediately. Is this in line with expectations?

From the code in ngx_http_upstream_next(), ft_type=NGX_HTTP_UPSTREAM_FT_NOLIVE always leads to ngx_http_upstream_finalize_request() while not ngx_http_upstream_connect().


Question 2: (not related with Question 1)
In my production environment, 192.168.0.5 is UP, and 192.168.0.6 is DOWN.
There are few access logs with $upstream_addr as "192.168.0.6, test", and $status as 502.
There were no error logs of connecting/reading 192.168.0.5 fails which mean this server is UP, so I think the request should try 192.168.0.5 after 192.168.0.6.
But it does not try 192.168.0.5, and just log "no live upstream" and return 502.
The logs like this are very few, and I can not re-produce this or debug it.
I just ask it here in case someone else know the problem.


Thanks in advance,
Wu
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

How can I get nginx-rtmp-module stats for all workers? (1 reply)

$
0
0
Hello,

I’ve set up nginx with nginx-rtmp-module as a NGINX-based Media Streaming Server, and it works fine, but now I try to get stats for this server.

General approach is to use

location /stat { rtmp_stat all; }

which produce xml that can be parsed nicely, but my suspicions are that I got stats for one worker random worker on each poll (not accumulated stats for all workers). The host itself is 4-cores, so I have 4 workers running and I think I got confusing stats since each poll brings me stats for random worker.

Is there any way I can use to get cumulated stats for all workers on host?

Thank you in advance!

- Alexander
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: fastcgi cache background update ssi подзапросов (no replies)

$
0
0
Добрый день,

On Wed, May 10, 2017 at 12:04:39PM -0400, metalfm1 wrote:
> Приветствую!
>
> Директива fastcgi_cache_background_update странно ведёт себя при ssi
> подзапросах.
> Есть сервис со сложной бизнес логикой, главная страница загружается 1 сек,
> стек nginx + php-fpm. В ходе оптимизации скорости загрузки было решено
> вынести генерацию самого долгого куска страницы в отдельный ssi подзапрос и
> кешировать его на 1 час. Кешированием управляет fastcgi сервер на php с
> помощью заголовка Cache-Control.
>
> С кеширование проблем нет, nginx успешно кеширует подзапросы /ssi_dev/ и
> складывает их на диск. Проблемы начинаются когда кеш протухает.
>
> Текущее поведение nginx
> - если есть элемент в кеше, то он успешно отдается(HIT)
> - если есть элемент в кеше, но он устарел, то клиенту отдаётся устаревшая
> версия(STALE) и делается подзапрос на прогрев кеша(EXPIRED)
>
> Проблема заключается в том, что подзапрос на прогрев кеша выполняется в
> блокирующем режиме. То есть основной запрос ждёт выполнения подзапроса.
> Указанная выше проблема не наблюдается, если в кеш класть всю страницу,
> поведение nginx соответствует документации. Клиенту отдаётся старая версия
> контента и делается неблокирующий подзапрос на обновление.

На текущий момент background update реализован так, что он блокирует основной
запрос, если запущен в подзапросе. Это как раз ваш случай.
В таск https://trac.nginx.org/nginx/ticket/1249 я аттачил патч, который должен
это вылечить.

[..]

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Viewing all 7229 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>