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

upstream 429 and non-idempotent request (no replies)

$
0
0
In case of upstream returning 429, I'd like to have nginx retry next
upstream server. Since nginx by default won't retry non-idempotent
requests, how do I force nginx to retry when receiving 429? I imagine this
should be the default behavior anyway, or does nginx not care about
returning code and will never retry non-idempotent?

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

2017 NGINX User Survey: Help Us Shape the Future (no replies)

$
0
0
It’s that time of year for the annual NGINX User Survey. We're always eager to hear about your experiences to help us evolve, improve and shape our product roadmap.

Please take ten minutes to share your thoughts: http://survey.newkind.com/r/rSzd0p89/ http://survey.newkind.com/r/rSzd0p89/

Thank you in advance,

Owen
---
owen@nginx.com

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

fastcgi_cache_key (no replies)

$
0
0
Hello,

I try to understand an example configuration and have difficulties with
following line:

fastcgi_cache_key "$request_method|$http_if_modified_since|
$http_if_none_match|$host|$request_uri";

Could somebody, please, explain what does it mean?

Thank you!

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

proxy_buffering off; does not work! (no replies)

$
0
0
Hi All,
I tried to set proxy_buffering off in nginx.conf to avoid the buffering time of the proxy. It was expected to work so that the proxy can immediately transfer the response message from the server to the client.
But it did not work. Just several beginning packets are immediately transferred. Then the proxy received about 16/17 packets with payload size 7240Bytes and then sent a 2920Bytes packet to client. Then received several big packets from server again and then sent several big packets to client.

The environment is:

client------>proxy (nginx 1.10.0)------->server(nginx 1.10.0)

The nginx.conf of proxy is as follows:
http {
include mime.types;
server_tokens off;
client_header_buffer_size 128k;
large_client_header_buffers 4 128k;

tcp_nodelay on;
tcp_nopush off;
postpone_output 0;

server {
listen 8080;
root /root/share;

location / {
proxy_buffering off;
proxy_ignore_headers X-Accel-Buffering;
proxy_buffer_size 1k;
#proxy_busy_buffers_size 2k;
#proxy_buffers 20 2k;
proxy_http_version 1.1;
proxy_pass http://10.*.*.*:8080/test.wmv; //hide the ip
}
}
}

I also tried to set proxy_buffering on, and set the proxy_busy_buffers_size to 2k. I want to let proxy transfer packet immediately by using the small proxy_busy_buffers_size. But it also did not work.

Does anybody know why? Anybody know how to configure to get the immediate transfer from the proxy?

Thank you very much!
Juan.

nginx equivalent for ExpiresByType / FilesMatch (1 reply)

$
0
0
Hello,

I continue to move my configuration from Apache to nginx and now need to
convert following directives. Any hints?

Thank you for all the previous help!

1.

<IfModule mod_expires.c>
# set up max-age header directive for certain file types for proper
caching
ExpiresActive on
ExpiresByType text/css A604800
ExpiresByType text/js A604800
....


2.

# force download for ceratain file types
<FilesMatch "\.(?i:fb2|mobi|mp3)$">
Header set Content-Disposition attachment
</FilesMatch>
<FilesMatch "\.(?:fb2)$>
Header set Content-type text/fb2+xml
</FilesMatch>

3.
Order Allow,Deny
Allow from All

# block certain files
<Files dirs.inc>
Order Allow,Deny
Deny from All
</Files>


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

apache rewrite to nginx (no replies)

$
0
0
I need some help, migrating from Apache to Nginx.
The following logic is in Apache, how do I convert to Nginx

<VirtualHost 172.20.1.145:443>
DocumentRoot "/var/www/default"
ServerName *.diasranch.net
SSLProxyEngine On
ProxyPreserveHost On
RewriteEngine on
RewriteMap host_finder prg:/usr/local/bin/host_finder.php
# Rule to handle the + character in (un)marking a voicemail and Par Cntl
RewriteCond %{HTTP_HOST} ^rwa-(.*) [OR]
RewriteCond %{HTTP_HOST} ^m2m-(.*) [OR]
RewriteCond %{HTTP_HOST} ^dwa-(.*)
RewriteRule ^(/ws/v[1-9]/dias/[^+]*)\+([^+]*)$ https://${host_finder:%{HTTP_HOST}}/$1\%2B$2https://$%7bhost_finder:%25%7bHTTP_HOST%7d%7d/$1/%2B$2 [NE,P,L]
RewriteCond %{HTTP_HOST} ^rwa-(.*) [OR]
RewriteCond %{HTTP_HOST} ^m2m-(.*) [OR]
RewriteCond %{HTTP_HOST} ^dwa-(.*)
RewriteRule ^(/ws/v[1-9]/dias/.*)\+(.*)$ $1\%2B$2 [N,NE]
# The next rule catches everything else and does not use the NE flag
RewriteCond %{HTTP_HOST} ^rwa-(.*) [OR]
RewriteCond %{HTTP_HOST} ^m2m-(.*) [OR]
RewriteCond %{HTTP_HOST} ^dwa-(.*)
RewriteRule ^/(.*) https://${host_finder:%{HTTP_HOST}}/$1https://$%7bhost_finder:%25%7bHTTP_HOST%7d%7d/$1 [P,L]
# The next rule is to defeat TRACE attecks which is a med security CVE
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
ErrorLog logs/ssl_error_log
#TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProxyProtocol all -SSLv2 -SSLv3
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/star.diasranch.net.crt
SSLCertificateKeyFile /etc/pki/tls/private/star.diasranch.net_key.pem
SSLCertificateChainFile /etc/pki/tls/certs/star.diasranch.net.crt
SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1..0 force-response-1.0
#CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x [%r] %b"
CustomLog /dev/null " "
</VirtualHost>

This message is confidential to Prodea unless otherwise indicated or apparent from its nature. This message is directed to the intended recipient only, who may be readily determined by the sender of this message and its contents. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient:(a)any dissemination or copying of this message is strictly prohibited; and(b)immediately notify the sender by return message and destroy any copies of this message in any form(electronic, paper or otherwise) that you have.The delivery of this message and its information is neither intended to be nor constitutes a disclosure or waiver of any trade secrets, intellectual property, attorney work product, or attorney-client communications. The authority of the individual sending this message to legally bind Prodea is neither apparent nor implied,and must be independently verified.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

nginx hogs cpu on Windows (no replies)

$
0
0
Hello,

I've noticed a few times already that after running for some time nginx
hogs a CPU thread. The machine has 8 CPU threads, so when the problem
happens I see in Task Manager that nginx takes 12% or 13% (consistent
with a full 1/8 of CPU power).

Issuing a reload fixes the problem temporarily.

c:\>nginx.exe -V
nginx version: nginx/1.13.1
built by cl 16.00.40219.01 for 80x86
built with OpenSSL 1.0.2l 25 May 2017
TLS SNI support enabled
configure arguments: --with-cc=cl --builddir=objs.msvc8 --with-debug
--prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid
--http-log-path=logs/access.log --error-log-path=logs/error.log
--sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp
--http-proxy-temp-path=temp/proxy_temp
--http-fastcgi-temp-path=temp/fastcgi_temp
--http-scgi-temp-path=temp/scgi_temp
--http-uwsgi-temp-path=temp/uwsgi_temp --with-cc-opt=-DFD_SETSIZE=1024
--with-pcre=objs.msvc8/lib/pcre-8.40
--with-zlib=objs.msvc8/lib/zlib-1.2.11 --with-select_module
--with-http_v2_module --with-http_realip_module
--with-http_addition_module --with-http_sub_module
--with-http_dav_module --with-http_stub_status_module
--with-http_flv_module --with-http_mp4_module --with-http_gunzip_module
--with-http_gzip_static_module --with-http_auth_request_module
--with-http_random_index_module --with-http_secure_link_module
--with-http_slice_module --with-mail --with-stream
--with-openssl=objs.msvc8/lib/openssl-1.0.2l --with-openssl-opt=no-asm
--with-http_ssl_module --with-mail_ssl_module --with-stream_ssl_module

Task Manager Performance when problem takes place:

Task Manager Processes when problem takes place:

Task Manager Performance after issuing reload:

Looks like there is a bug somewhere. I wonder if it is limited to
Windows or if it's on all distributions.

Thank you,


Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

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

Problems with setting max-age header directive (no replies)

$
0
0
Hello,

I try to set max-age header using expires, as follows:

location / {
# set up max-age header directive for certain file types for proper
caching
location ~* \.(?:css|js|ico|gif|jpe?g|png|mp3|mpeg|wav|x-ms-wmv|eot|
svg|ttf|woff|woff2)$ {
expires 7d;
add_header Cache-Control "public";
}

location /static_files/ {
expires 7d;
add_header Cache-Control "public";
}
try_files $uri $uri/ @nc-rewrite;
}

My problem are files that do not have proper extension, but need to
cached and they are located in /static_files/. For some reason
location /static_files/ {} is used according to logs (see bellow), but
max-age/Cahe-Control is not set. Why?

Thank you in advance!

----error.log-----

2017/06/13 16:43:18 [debug] 30872#0: *1 using configuration
"/static_files/"


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

Quinceanera nevada (3 replies)

$
0
0
Hello my name is Yadira and I want to sign up my twins for the cover page, can I get information please. Thank you


Sent from my iPhone
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

several sibling location block (no replies)

$
0
0
Hello,

I try to convert following apache related stuff:

# force download for ceratain file types
<FilesMatch "\.(?i:fb2|mobi|mp3)$">
Header set Content-Disposition attachment
</FilesMatch>
<FilesMatch "\.(?:fb2)$>
Header set Content-type text/fb2+xml
</FilesMatch>
<FilesMatch "\.(?:mobi)$>
Header set Content-type application/x-mobipocket-ebook
</FilesMatch>
<FilesMatch "\.(?:mp3)$>
Header set Content-type audio/mpeg
</FilesMatch>

to nginx, as follows:


location / {

# force download for ceratain file types
location ~* \.(?:fb2|mobi|mp3)$ {
add_header Content-Disposition "attachment";
}
location ~* \.fb2$ {
add_header Content-type "text/fb2+xml";
}
location ~* \.mobi$ {
add_header Content-type "application/x-mobipocket-ebook";
}
location ~* \.mp3$ {
add_header Content-type "audio/mpeg";
}

....
}

Content-Disposition "attachment" seems to be added properly to the
header, however not the Content-type. Why? Can several sibling location
blocks that match be proceeded or only one?

Thank you!

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

Peer closed connection in SSL handshake (no replies)

$
0
0
Hello.
I want to authenticate my server using certificates on my hardware.

I have created a private certificate with openssl and have completed the connection test without errors in the browser.


This is the setting for nginx.

server {
listen 14443;
listen [::]:14443;
ssl on;
ignore_invalid_headers off;
proxy_ssl_server_name on;
server_name cert.mydomain.com;

root /var/service/auth;
index index.html;

#include /etc/nginx/mime.types;

error_log /var/log/nginx/auth_ssl_err.log debug;
access_log /var/log/nginx/auth_ssl_acc.log;

ssl_certificate /etc/nginx/ssl/private/server.crt;
ssl_certificate_key /etc/nginx/ssl/private/server_key.pem;
ssl_client_certificate /etc/nginx/ssl/private/ca.crt;
ssl_verify_client on;
ssl_verify_depth 2;
ssl_session_cache shared:SSL:5m;
ssl_session_timeout 5m;

ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;

if ($request_method !~ ^(GET|HEAD|PUT|POST|DELETE|OPTIONS)$ ){
return 405;
}

location / {
proxy_pass http://localhost:8880;
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 cert-expire $ssl_client_v_end;
proxy_set_header cert-dn $ssl_client_s_dn;
proxy_redirect default;
}
}

I get an error when I connect to the server with a user certificate (crt file) on my hardware.

Peer closed connection in SSL handshake (104: Connection reset by peer) while SSL handshaking, client: 222.110.133.193, server: 0.0.0.0:14001

Please help me with what is wrong.

Connection timeout (no replies)

$
0
0
Hi,

I am using nginx/1.12.0 as reverse proxy with Apache/2.2.15

Relevant configuration is:


upstream backend {
ip_hash;
server 127.0.0.1:8080; # IP goes here.
}


server {
listen 2xxxxx; # IP goes here.

server_name www.somesite;

# Set proxy headers for the passthrough
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header X-Forwarded-For $remote_addr;

# Let the Set-Cookie header through.
proxy_pass_header Set-Cookie;

# Max upload size: make sure this matches the php.ini in .htaccess
client_max_body_size 8m;

# Catch the wordpress cookies.
# Must be set to blank first for when they don't exist.
set $wordpress_auth "";
if ($http_cookie ~* "wordpress_logged_in_[^=]*=([^%]+)%7C") {
set $wordpress_auth wordpress_logged_in_$1;
}

# Set the proxy cache key
set $cache_key $scheme$host$uri$is_args$args;

location ~* ^/account
{
proxy_pass http://backend;
expires off;
}
location ~* ^/user
{
proxy_pass http://backend;
expires off;
}
location ~* ^/login
{
proxy_pass http://backend;
expires off;
}


location / {
proxy_pass http://backend;
proxy_cache main;
proxy_cache_key $cache_key;
proxy_cache_valid 30m; # 200, 301 and 302 will be cached.
proxy_cache_use_stale error
timeout
invalid_header
http_500
http_502
http_504
http_404;
# 2 rules to dedicate the no caching rule for logged in users.
proxy_cache_bypass $wordpress_auth; # Do not cache the response.
proxy_no_cache $wordpress_auth; # Do not serve response from cache.
proxy_buffers 8 2m;
proxy_buffer_size 10m;
proxy_busy_buffers_size 10m;
}
}


for several hours main website has been reported as "down".

In fact, I noticed several messages like this in /var/log/nginx/error_log:


2017/06/10 01:20:21 [error] 2038#2038: *4778137 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 15yyyyyyyyyyyy, server: www.somesite.it, request: "GET /30541-2/ HTTP/1.1", upstream: "http://127.0.0.1:8080/305dd-2/", host: "www.somesite.it", referrer: "https://www.google.it/"


But, according to Apache logs, I have no errors at all, and I have access with "200 OK" all the time.

So, I guess, Apache still received requests from nginx.

How is it possible?

thank you very muhc _______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Is post_action deprecated? (no replies)

$
0
0
Hi All,

To start with, here's some context. From what i've read around, the post_action directive is to be used with caution. I was able to find this information following the link from this post: https://forum.nginx.org/read.php?2,262008,262012#msg-262012

I also found documentation on the directive in this book: ISBN: 9781785280337. Although it's no where to be found in the official documentation, the directive is supported and is working well for what I need to do.

I need to use this directive to send some bandwidth information to my backend after a file download.

1- I'm wondering, is this directive officially deprecated and if, so is there something in the pipeline to replace it?
2- Looking at the nginx tracker (https://trac.nginx.org), I only found 1 issue (#1237) still opened that actually relate to post_action. Did I miss something?
3- What alternative do I have to post_action if basically, all I want to do is perform an additional action in the backend following a file download.

Cheers!

Separate logs within the same server for different server names? (1 reply)

$
0
0
Hello,

is it possible somehow to define separate logs within the same server{}
for different server names (server_name one.org two.org;)?

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

Thank you!

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

Invalid HTTP_IF_NONE_MATCH request header (6 replies)

$
0
0
Hi,

I'm trying to implement conditional requests in Django-hotsauce and
would like to use HTTP_IF_NONE_MATCH to return a 304 Not Modified
response. However in nginx the value of HTTP_IF_NONE_MATCH is incorrect
(a empty string is returned).

Here's my nginx config:

# configuration file /etc/nginx/nginx.conf:
user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
worker_connections 512;
multi_accept on;
use epoll;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 80;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

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

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

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

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

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/development.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;
# }
#}

# configuration file /etc/nginx/mime.types:

types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;

text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;

image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
image/webp webp;

application/font-woff woff;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.apple.mpegurl m3u8;
application/vnd.ms-excel xls;
application/vnd.ms-fontobject eot;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/xspf+xml xspf;
application/zip zip;

application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream iso img;
application/octet-stream msi msp msm;

application/vnd.openxmlformats-officedocument.wordprocessingml.document
docx;
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
application/vnd.openxmlformats-officedocument.presentationml.presentation
pptx;

audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;

video/3gpp 3gpp 3gp;
video/mp2t ts;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}

# configuration file /etc/nginx/conf.d/development.conf:
server {

# static medias web server configuration, for development
# and testing purposes.

listen 80;
server_name localhost;
error_log /var/log/nginx/error_log; #debug
#access_log /var/log/nginx/gthc.org/access.log;
root /home/erob/www/isotopesoftware.ca;
#autoindex on;

location / {
# # host and port to fastcgi server
fastcgi_pass 127.0.0.1:8808; # 8808=gthc.org; 8801=tm
include fastcgi_params;
autoindex on;
# # rewrite /CamelCase to /wiki/CamelCase
# rewrite ^/(.*[A-Z][a-z]*)$ /wiki$1 last;
etag on;
#fastcgi_pass_header $http_if_none_match;
}


# debug url rewriting to the error log
rewrite_log on;

location /media {
autoindex on;
gzip on;
}

location /pub {
autoindex on;
gzip on;
}

location /webalizer {
autoindex on;
gzip on;
#auth_basic "Private Property";
#auth_basic_user_file /etc/nginx/.htpasswd;
allow 67.68.76.70;
deny all;
}

location /documentation {
autoindex on;
gzip on;
}

location /moin_static184 {
autoindex on;
gzip on;
}

location /favicon.ico {
empty_gif;
}
location /robots.txt {
root /home/www/isotopesoftware.ca;
}
location /sitemap.xml {
root /home/www/isotopesoftware.ca;
}

#location /public_html {
# root /home/www/;
# autoindex on;
#}
# redirect server error pages to the static page /50x.html
#error_page 404 /404.html;
#error_page 403 /403.html;
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}

include conf.d/moinmoin.conf;
#include conf.d/hgwebdir.conf;
}


# configuration file /etc/nginx/fastcgi_params:
fastcgi_param PATH_INFO $fastcgi_script_name;
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 GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;

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


fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;
fastcgi_param HTTP_IF_MODIFIED_SINCE $http_if_modified_since;


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

fastcgi_send_timeout 90;
fastcgi_read_timeout 90;
fastcgi_connect_timeout 40;
fastcgi_cache_valid 200 304 10m;
#fastcgi_buffer_size 128k;
#fastcgi_buffers 8 128k;
#fastcgi_busy_buffers_size 256k;
#fastcgi_temp_file_write_size 256k;


# configuration file /etc/nginx/conf.d/moinmoin.conf:


location /wiki {


if ($uri ~ ^/wiki(.*)?){
set $wiki_url $1;
}
# host and port to fastcgi server
fastcgi_pass 127.0.0.1:8807; # 8808=gthc.org; 8801=tm; 8807=moinmoin
#include fastcgi_params;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
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_FILENAME $document_root$fastcgi_script_name;
#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 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 PATH_INFO $wiki_url;
fastcgi_param SCRIPT_NAME /wiki;
}
#location /moin_static184 {
# root /home/www/isotopesoftware.ca;
# autoindex on;
#}

Configuration:
sudo nginx -V
nginx version: nginx/1.12.0
built by gcc 4.9.2 (Debian 4.9.2-10)
built with OpenSSL 1.0.2l 25 May 2017
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=2'
--with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx
--conf-path=/etc/nginx/nginx.conf
--http-log-path=/var/log/nginx/access.log
--error-log-path=/var/log/nginx/error.log
--lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit
--with-ipv6 --with-http_ssl_module --with-http_stub_status_module
--with-http_realip_module --with-http_auth_request_module
--with-http_addition_module --with-http_dav_module
--with-http_gzip_static_module --with-http_image_filter_module
--with-http_sub_module --with-threads


Questions:

1. Any suggestions why the value of HTTP_IF_NONE_MATCH is not defined in
nginx ?
2. Why is the python script working with wsgiref but not in nginx ?

Thank you in advance,

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

(no subject) (no replies)

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

How to use Nginx to get HTTPS POST from cloud vendor (no replies)

$
0
0
Hi,

I am looking detail document to learn how use Nginx to receive HTTPS POST data from below data format. I already searched documents from google but all of documents did not explain in detail for learning. Please advise. Thank you.



HTTPS POST BODY

{
"version":"2.0",
"secret":<string>,
"type":<event type>,
"data":<event-specific data>
}

HTTPS special data format

{
"apMac": <string>,
"apTags": [<string, ...],
"apFloors": [<string>, ...],
"observations": [
{
"clientMac": <string>,
"ipv4": <string>,
"ipv6": <string>,
"seenTime": <string>,
"seenEpoch": <integer>,
"ssid": <string>,
"rssi": <integer>,
"manufacturer": <string>,
"os": <string>,
"location": {
"lat": <decimal>,
"lng": <decimal>,
"unc": <decimal>,
"x": [<decimal>, ...],
"y": [<decimal>, ...]
},
},...
]
}

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

Proxy LDAP port TCP 389 (1 reply)

$
0
0
I am trying to use NGINX Plus (nginx version: nginx/1.11.10
(nginx-plus-r12-p2)) as a load balancer for VMware Platform Services
Controller v 6.5. Everything seems to work except port 389.

Config:

.. . .
stream {
upstream ftwyin_psc_389 {
zone ftwyin_psc 64k;
server 192.168.183.20:389 weight=1;
server 192.168.183.22:389 weight=2;
}
.. . .

server {
listen 192.168.183.41:389;
proxy_pass ftwyin_psc_389;
status_zone status_page;
}
.. . .


I am seeing the following error in the NGINX error.log:
" connect() to 192.168.183.20:389 failed (13: Permission denied) while
connecting to upstream, client: 192.168.183.21, server: 192.168.183.41:389,
upstream: "192.168.183.20:389""


Any ideas?
--
Jeff Creek
INdigital
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

How can I rewrite .php files properly? (1 reply)

$
0
0
Hi guys,

I am running a MediaWiki installation and I am using this block of rules to rewrite requests to MediaWiki:


location ~ \.php {
root /home/$username/www/;
index index.php index.html;
try_files /dummy/$uri @php;
}

However, this is creating the problem that wiki pages, which end on .php can no longer be accessed. Instead, nginx only responds with "File not found."

What can I do to make all requests still go to MediaWiki, but to then let MediaWiki handle the actual paths?

E.g. a request to MyWikiPages/File.php should still be passed to MediaWiki, but then MediaWiki should display the according wiki page.

Cheers!

Jörg

2017 NGINX User Survey: Help Us Shape the Future [reminder] (no replies)

$
0
0
It’s time for the annual NGINX User Survey. We're always eager to hear about your experiences to help us evolve, improve, and shape our product roadmap.

Please take ten minutes to share your thoughts: http://survey.newkind.com/r/rSzd0p89/ http://survey.newkind.com/r/rSzd0p89/

Thank you in advance,

Owen
---
owen@nginx.com <mailto:owen@nginx.com>

_______________________________________________
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>