Quantcast
Viewing all 972 articles
Browse latest View live

"add_header" directive is not allowed here

Hi

I have this service where I proxy_pass a lot of different locations to different services.
All "locations" in this "server" need to have a lot of add_header lines for cors filtering.
But if I move the add_header from the "location" to the "server" section I get a:
nginx: [emerg] "add_header" directive is not allowed here in

Do I have to have all these "add_header" in each "location" or is there a trick I can do?

server {
listen 80;
server_name example.org;
location /foo {
root /var/www/nginx/html;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*' always;
# many lines here with "add_header"
return 204;
}
proxy_pass http://localhost:8080;
}
}

best regards
Hans

Re: routines:ssl3_check_cert_and_algorithm:dh key too small

I've run into this problem too, and I've done some tests that show it's related to either the server or the client's version of openssl, such as when both my client and server are: OpenSSL version 1.0.2g will trigger this problem, and if one of the clients and servers is not this version, it won't. So either OpenSSL version or nginx. Finally, I chose haproxy.

502 error comes frequently on ngnix server

Ngnix server giving 502 error frequently
It redirects the request to node server rest api

Let nginx do retry on other upstream if fail or not?

Is it good in general to let nginx do retry on other upstream if one fail, timeout and etc?
There is a setting "proxy_next_upstream" and "proxy_next_upstream_tries" for configuring that, and even if we can configure the behavior for "non_idempotent" to not be retried, but is it good to assume that no one will use a GET request for non_idempotent behavior?

Cannot create another blocks conf error

Hi everyone,

Im stuck on one of my blocks. I have 6 blocks running but i add another blocks jpm, create a jpm.conf for it in conf.d and other setting just like the running blocks. then restart the nginx service it will stopped. All my blocks were down. All i need to do is rename jpm.conf to jpm, then start the nginx service and it will start the service.

So my question is why i cant add another site?

Setting up Nginx as an load balancer

Hi Team,

I am fairly new to Nginx. I needed info how to we setup Nginx as a load balancer in multi tier architecture.
Hence client hitting VIP will in different network & server sub-net will be in other network. So, is that we need to configure our Nginx server as route forwarer also.

Nginx autoindex not working - 404 error

I have a server block which displays properly, unless I set it to autoindex. This results in a 404 not found error.

server block:

<code> server {
# listen 80;
# server_name $domain_name;
root /var/www/html/files;
# root /var/www/html;
# autoindex on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
</code>

Solved: Nginx autoindex not working - 404 error

I solved this by adding this to nginx.conf

<--snip>
}
location /files {
autoindex on;
autoindex_exact_size off;
}
<--snip>

And this is my server block

<--snip>
server {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
<--snip>

I am not sure what effect it had, but I also changed the root and sites available path from /var/www/html to /var/www

SSL not working after NGINX upgrade

HI Team,

I am new NGINX. Recently we had a major issue with once of the load balancers in AWS account afte NGINX upgrade.

We upgrade NGINX from version 1.8 to 1.12; after this Load balancer (in AWS) was not able to connect to the NGINX over SSL. We had raised a case with AWS and they confirmed no issues form their end.

We need to know if there is any difference in the way SSL is handled by v1.8 and 1.12?

Please provide me some guidance.

Thanks

how to improve performance of drupal on nginx

I want to imporve drupal website performance. Already did settings for drupal cache & Advanced CSS/JS Aggregation. Also implemented the changes requested by gtmatix still it takes 20 seconds to load. Also implemented fastcgi cache but no improvement. Below is my nginx.conf settings:

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

events {
worker_connections 768;
}

http {

client_max_body_size 24M;

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

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

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

gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;

fastcgi_cache_path /etc/nginx-cache levels=1:2 keys_zone=microcache:5m max_size=1000m;
log_format cache '$remote_addr - $remote_user [$time_local] "$request" '
'$status $upstream_cache_status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

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


Below is the site configuration:

server {
root /var/www/vhosts/www.example.com.cn/public_html;
index index.php index.html index.htm;
server_name www.example.com.cn;
access_log off;
error_log /var/www/vhosts/www.example.com.cn/log/www.example.com.cn.error.log;

location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ /\.ht {
deny all;
}
location ~ \..*/.*\.php$ {
return 403;
}
location ~ ^/sites/.*/private/ {
return 403;
}
location ~ ^/sites/[^/]+/files/.*\.php$ {
deny all;
}
location ~ (^|/)\. {
return 403;
}
location / {
try_files $uri /index.php?$query_string; # For Drupal >= 7
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ \.php$ {
# Setup var defaults
set $no_cache "";
# If non GET/HEAD, don't cache & mark user as uncacheable for 1 second via cookie
if ($request_method !~ ^(GET|HEAD)$) {
set $no_cache "1";
}
# Drop no cache cookie if need be
# (for some reason, add_header fails if included in prior if-block)
if ($no_cache = "1") {
add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
add_header X-Microcachable "0";
}
# Bypass cache if no-cache cookie is set
if ($http_cookie ~* "_mcnc") {
set $no_cache "1";
}
# Bypass cache if flag is set
fastcgi_no_cache $no_cache;
#fastcgi_cache_bypass $no_cache;
fastcgi_cache microcache;
fastcgi_cache_key $server_name|$request_uri;
fastcgi_cache_valid 404 30m;
fastcgi_cache_valid 200 301 302 10m;
fastcgi_max_temp_file_size 1M;
fastcgi_cache_use_stale updating;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

#proxy_cache_use_stale updating error timeout http_500 http_502 http_503 http_504;
fastcgi_cache_revalidate on;
#fastcgi_cache_background_update on;

fastcgi_param PATH_INFO $fastcgi_path_info;
#fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;

include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ ^/sites/.*/files/styles/ { # For Drupal >= 7
try_files $uri @rewrite;
}
location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
try_files $uri /index.php?$query_string;
}
location ~* \.(jpg|js|css|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|pdf|woff|woff2|ttf)$ {
try_files $uri @rewrite;
expires max;
log_not_found off;
access_log off;
add_header 'Access-Control-Allow-Origin' '*';
}
location ~ ^/sites/default/files/(?:css|js) {
gzip_static on;
access_log off;
expires max;
}
}

google search console webmaster alert http status 502

Olá em um domínio que gerencio https://bucetas.blog tenho recebido notificações no painel do google webmaster sobre erro http status 502. A alguns dias atrás desliguei a cloudflare desconfiando qe poderia ser um probela da content deliverd network (CDN) e aguardei mas o erros continuarão a aparecer no painel. Nessa situação como proceder para corrigir o problema no nginx?

Nginx (I assume) sometimes adds 5000ms to response time

Hello everyone!

There is a weird thing I noticed on one of the servers that act as proxy that's bugging me for hours and I can't figure it out. Some requests get served to client exactly 5000ms after the content is fetched from upstream

For example - request_time vs upstream_response_time:

5.791 0.791
5.202 0.202
6.125 1.125
5.360 0.360
5.106 0.105
5.329 0.329
5.293 0.293


It happens for a small percentage of requests and it usually comes in tiny "bursts" - it means I can see 5 such requests being served in a few seconds (its also higher possibility of higher delay but not exactly 5s in that timeframe) then everything is OK for a few minutes. I searched everywhere if there is some timeout configured in configs to 5 seconds or if there is some default nginx value set to 5 seconds but can't find anything. It happens on different cleints/networks.

Anyone has an idea how could I figure out what's going on?

Thanks!

NGinx taking long time to get the contents from Cache

NGinx is taking long time to get the contents from the cache. Please look at the logs below.

84.210.206.210 - - [04/Oct/2018:13:24:55 +0000] "GET /mdp/show/574e46822e853fa0f380f1e3/groupid%3A%2F%2F650183866?pset=mdp%3Ano-presentation&filter%3AfirstRun=false HTTP/1.1" 200 23059 "-" "Apache-HttpClient/4.5.2 (Java/1.8.0_05)" cachestatus: HIT dest: - response_time: 13.003
84.210.206.210 - - [04/Oct/2018:13:24:55 +0000] "GET /mdp/show/574e46822e853fa0f380f1e3/groupid%3A%2F%2F650183866?pset=mdp%3Ano-presentation&filter%3AfirstRun=false HTTP/1.1" 200 16219 "-" "Apache-HttpClient/4.5.2 (Java/1.8.0_05)" cachestatus: HIT dest: - response_time: 51.513
84.210.206.210 - - [04/Oct/2018:13:24:55 +0000] "GET /mdp/show/574e46822e853fa0f380f1e3/groupid%3A%2F%2F650183866?pset=mdp%3Ano-presentation&filter%3AfirstRun=false HTTP/1.1" 200 1403792 "-" "Apache-HttpClient/4.5.2 (Java/1.8.0_05)" cachestatus: HIT dest: - response_time: 3.513
84.210.206.210 - - [04/Oct/2018:13:24:55 +0000] "GET /mdp/show/574e46822e853fa0f380f1e3/groupid%3A%2F%2F650183866?pset=mdp%3Ano-presentation&filter%3AfirstRun=false HTTP/1.1" 200 18955 "-" "Apache-HttpClient/4.5.2 (Java/1.8.0_05)" cachestatus: HIT dest: - response_time: 42.008
84.210.206.210 - - [04/Oct/2018:13:24:55 +0000] "GET /mdp/show/574e46822e853fa0f380f1e3/groupid%3A%2F%2F650183866?pset=mdp%3Ano-presentation&filter%3AfirstRun=false HTTP/1.1" 200 28531 "-" "Apache-HttpClient/4.5.2 (Java/1.8.0_05)" cachestatus: HIT dest: - response_time: 23.008
There are few taking even 50s. I am not sure why is this happening. My Config is as follows.

proxy_cache_path /var/cache/nginx/mdp_cache levels=1:2 keys_zone=mdp_cache:128m max_size=5g loader_threshold=300 loader_files=200 inactive=120m;

location ~ /mdp/show/(.*) {
proxy_pass http://mdp;
proxy_cache mdp_cache;
proxy_cache_lock on;
proxy_cache_lock_age 60s;
proxy_cache_lock_timeout 60s;
proxy_read_timeout 60000ms;
proxy_http_version 1.1;
proxy_set_header Connection "";
#proxy_ignore_headers Cache-Control;
#proxy_ignore_headers Expires;
#proxy_cache_revalidate on;
proxy_cache_min_uses 1;#minimum number of resquests to be hit before getting cached
proxy_cache_valid 404 0s;
proxy_cache_valid 200 201 202 203 204 304 240m;#200 201 202 203 204 http cached response is valid for 120 min
proxy_cache_valid 502 504 0s;#dont cache 502, 504 responses
add_header X-Proxy-Cache $upstream_cache_status;#To figure out if the response was from cache or not
add_header X-Proxy-GRID T4;
}
Any idea what i am doing wrong here?

RTMP HLS

Hallo, i have a Problem with my NGINX HLS Stream.... the rtmp stream comes to my Platforms Like Facebook and Youtube.

But the URL Page dont open... 403 Forbidden Shows the Page when i go on http:myip/hls

When i (the moment live) try to get the stream in index.html

No source compatible Source found... my Config File is that:


#user www-data;
worker_processes 1;

error_log logs/rtmp_error.log debug;
pid logs/nginx.pid;

events {
worker_connections 1024;
}

http {
server {
listen 80;
server_name HavannaInvestorsClub;

location /hls {
# Serve HLS fragments

# CORS setup
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length';

# allow CORS preflight requests
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}


types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
add_header 'Access-Control-Allow-Origin' '*';

}
}
}

rtmp {
server {
listen 1935;
chunk_size 8192;

application live{
live on;
record off;
meta copy;
hls on;
hls_path /tmp/hls;
allow publish all;
push "rtmp://live-api-s.facebook.com:80/rtmp/2"; #FB Profil
push "rtmp://live-api-s.facebook.com:80/rtmp/9"; #Minbuilder
}

so when i will open it on http://myip/ he didnt find a source
and when i open http://myip/hls/live a 404 error and without live a 403 Forbidden

Thanks for any help

How to send request from backend service isolated with nginx

hi
Using micro service isn’t easy for me, unfortunately. I have a problem to use external api in my services.
Considering I need to connect to the google Recaptcha, but I can’t, because my server is dockeriz.

Although I used a proxy which is my Nginix container but I have an error, how can I fix it ? by the way if I don’t give internet to the elixir html container, it won’t be able to connect to google Recapcha api, but I need to isolate this without internet, because there is a nginx proxy.

and my second problem is how I can use external api in my private microservices behind my api gate way. I don’t want to give an internet to the private container and I need to use a safe proxy.

Thank you

[HELP!] Got empty response with status code 200 when I have multiple sub-request due to multiple ssi (7~8 ssi insert)

It seems works fine when the output size is small. but it will occur in some probability when the output size (about 14000 k) is big, The probability of occurrence is about 40% ~ 50%.

Below is relative info.

error_log sample
```
[alert] 6#6: *130 header already sent while sending response to client, client: xxx, server: xxx, request: "GET /my-page HTTP/1.1", subrequest: "xxxhtml", host: "xxx"
```

access log sample

```
[06/Nov/2018:02:06:15 +0000] "GET /my-page HTTP/1.1" 200 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
```

nginx info

```
nginx -V
nginx version: nginx/1.15.5
built by gcc 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
built with OpenSSL 1.1.0f 25 May 2017
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.15.5/debian/debuild-base/nginx-1.15.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
```

My nginx config:

1. nginx.conf
```
user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/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 /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}
```

2. server.conf
```
server {
listen 80;
server_name xxx;
root xxx;

disable_symlinks off;
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 text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
#add_header Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate";

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

location ~ [^/]\.php(/|$) {
ssi on;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
#if (!-f $document_root$fastcgi_script_name) {
# return 404;
#}
fastcgi_read_timeout 120s;
fastcgi_send_timeout 120s;
fastcgi_pass php-fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/local/rms/evt/toto/public$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED /usr/local/rms/evt/toto/public$fastcgi_path_info;
}

rewrite_log on;
error_log /var/log/nginx/project_error.log debug;
access_log /var/log/nginx/project_access.log;
error_page 500 503 /error50x.html;
error_page 404 /error404.html;
}
```

3. fastcgi_params

```
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_NAME $fastcgi_script_name;
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 REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;

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;

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

Re: [HELP!] Got empty response with status code 200 when I have multiple sub-request due to multiple ssi (7~8 ssi insert)

I solved the problem by disabling "fastcgi_buffering" or increasing fastcgi_buffer_size. Before nginx uses default buffer size and it failed.

It seems irrelevant to ssi but ssi somehow trigger the error. But still I don't know why there was multiple empty response. Can anybody have any explanation about this?

RMTP and FLV

I have this configuration:

rtmp {
server {
listen 1935;
chunk_size 4096;

application Live{
live on;
record off;
hls on;
hls_path tmp/hls;
hls_fragment 5s;
}
}
}

What i need to do to add FLV support to reproduce live streaming in a local SWF with flvplayback in Flash CS6?

And how can i create specific keys to stream, just to prevent anybody can't rtmp in my server? i want to create some restrictions

Nginx authentication to Sphinx search

Hello. I have a development ubuntu server with Nginx 1.14.0. which is running a site dev.mysite.com under authentication. To see the site you must enter user name and pass.
This is my sites-enabled conf file:
upstream fastcgi_backend {
server 127.0.0.1:9000;
}

#server {
# listen 80;
# server_name dev.mysite.com;
# return 301 https://dev.mysite.com$request_uri;
#}

server {
listen 80 default_server;
server_name dev.mysite.com; # dev.mysite.com;
root /home/wpaper/public_html;

#check http_x_forwarded_proto value that comes from load balancer
set $my_http "http";
set $my_ssl "off";
set $my_port "80";

if ($http_x_forwarded_proto = "https") {
set $my_http "https";
set $my_ssl "on";
set $my_port "443";
}

#cut off port from url
port_in_redirect off;

#setup log files
access_log /home/wpaper/www_logs/wpaper.access.log;
error_log /home/wpaper/www_logs/wpaper.error.log;

include includes/blocks.conf;

# Include Security rules for Mageto
include includes/security.conf;

# Tell browsers that website should olways be accessible via HTTPS
# add_header Strict-Transport-Security "max-age=15984000" always;

# Include redirects
include includes/redirects.conf;

# Include static
include includes/static.conf;



# Add rewrite for product feeds
location ~ ^/en/skroutzfeed\.xml {
expires 24h;
try_files /home/wpaper/public_html/skroutzfeed_en.xml /skroutzfeed_en.xml =404;
}
location ~ ^/el/skroutzfeed\.xml {
expires 24h;
try_files /home/wpaper/public_html/skroutzfeed_gr.xml /skroutzfeed_gr.xml =404;
}
location ~ ^/skroutzfeed\.xml {
expires 24h;
try_files /home/wpaper/public_html/skroutzfeed_gr.xml /skroutzfeed_gr.xml =404;
}
include includes/phpmyadmin.conf;
#include includes/solr.conf;

#location ~ ^/el {
# #set $magento_run_code "el";
# #set $magento_run_type "store";
#}

#location ~ ^/en {
# #set $magento_run_code "en";
# #set $magento_run_type "store";
#}

location / {
#expires 30d;
index index.html index.php;
set $magento_run_code "el";
set $magento_run_type "store";
try_files $uri $uri/ @handler;
}

location @handler {
rewrite / /index.php;
}

#location = /js/index.php/x.js {
# rewrite ^(.*\.php)/ $1 last;
#}

location ~ \.php {
expires off;
fastcgi_pass fastcgi_backend;
fastcgi_buffers 8 32k;
fastcgi_buffer_size 64k;
fastcgi_busy_buffers_size 64k;
fastcgi_connect_timeout 3000s;
fastcgi_read_timeout 3000s;
fastcgi_send_timeout 3000s;
fastcgi_param HTTPS $my_ssl;
fastcgi_param REMOTE_ADDR $http_x_real_ip;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
}

I have installed in this server Sphinx search with success. Index is running fine....But when I try to run some php scripts from my site's folder I get Nginx Authorisation required 401 error in console. I think it has something to do with the authentication we have in Nginx.
Can anyone help me what to do?

About "an upstream response is buffered to a temporary file"

The following warning message is output by NGINX being used as a reverse proxy.

------------------
 while reading upstream, client: 1.1.1.1, server: abc.com, request:: warning 24547 # 0: * 2408454 an upstream response is buffered to a temporary file / var / cache / nginx / proxy_temp / 5/31/0000017695 while reading upstream, GET
------------------

Question
· While checking other cases in the forum, this message shows that the response from the upstream is not cached in the buffer but cached on the disk, but is the buffer subject only to the header or Is it the entire response?

· When this message is output, is the communication itself continued?

· Please tell me how to suppress output of this message and how to deal with it.

· Which function corresponds to the function outputted by this message?
(Proxy_buffer_size, proxy_buffers, is it another function?)
Viewing all 972 articles
Browse latest View live


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