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

nginx limit_req_module with upstream limit_rate (3 replies)

$
0
0
Hello,

We want to limit outgoing(upstream) rate with the fixed string key among
various virtual hosts as follows:

limit_req_zone fixedstring zone=upstream:1m rate=5000r/s;

server {
server_name vhosta;
logation / {
limit_req zone=upstream burst=25;
proxy_pass http://some_upstream;
}
}
server {
server_name vhostb;
logation / {
limit_req zone=vhostb nodelay;
limit_req zone=upstream burst=25;
proxy_pass http://some_upstream;
}
}

But on our test, the nginx server send to upstream server 6738 requests in
a second.
(The vhosta sent 3677 requests, and the vhostb sent 3061 requests)



It seems that each virtual hosts limits 5000r/s and entire nginx will
10000r/s.
Anyway, we will set limit_req_log_level to info level.
Does anyone know limit_req detailed log information?
Our nginx version is nginx version: nginx/1.10.1
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Valid characters in nginx configuration (no replies)

$
0
0
Hi,

there can I find the description of the nginx configuration file syntax e.g. in a BNF like notation. There is defined which characters are allowed in "name" e.g. of an upstream definition? Only ASCII or UTF8, only alpha or alphanumeric and if the last, must it start with alpha. Can I use special characters like "@"? IMO is this the basic information which should be on top of the documentation but either is does not exists or is very good stashed ;-)

I'm not the first which ask this in the web: http://stackoverflow.com/questions/36485834/valid-characters-in-nginx-upstream-name, but there is no answer and it is from 10 years ago :-(

Can anyone help me please? Maybe I use wrong search terms.

TIA,
SW

Sent with [ProtonMail](https://protonmail.com) Secure Email._______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Can't create forum account (no replies)

$
0
0
Hi everyone,

I'm trying to create an account at forum.nginx.org and it keeps saying
denied due to suspected spammer. I've tried from many different ISPs in a
few countries (USA included), different email addresses (different domains)
and nothing is working. I've tried having the captcha read to me as well.
I've never had a problem signing up for an account like this....

Any ideas?
Thanks
J
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Simple reverse proxy - 520 bad gateway (1 reply)

$
0
0
Trying to do a simple proxy from sub.domain.com/link1 to another server on
the LAN - 10.1.1.1:8080/someotherlink1.

This is what my server context looks like: (I modified the default
nginx.conf)

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name sub.domain.com;
root /;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location /link1 {
proxy_pass http://10.1.1.1:8080/link2
}
}

`

but visiting a webpage is just loading the nginx 502 bad gateway page.

Error in the log is:

2017/03/15 22:04:27 [crit] 8647#0: *11 connect() to 10.1.1.1:8080 failed
(13: Permission denied) while connecting to upstream, client:
112.xxx.xxx.xxx, server: sub.domain.com, request: "GET /link1/ HTTP/1.1",
upstream: "http://10.1.1.1.1:8080/link2/", host: "sub.domain.com"

whats a bit strange looking is the GET /link1/ - as this this should not be
the link in the final upstream URL - it should not be trying to get this
link.

What am I doing wrong?

Thanks,

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

server listen directive for IPV4 and IPV6 (2 replies)

$
0
0
There is a lot of confusion in the answers I fount about it.

When I installed nginx first, it was the debian jessie version 1.6.2 and the configuration to listen to both ipv4 and ipv6 was

#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}

Now I use nginx 1.11.10 and the example configuration file only has one line:
listen 80;


Should I update my configuration? I might be wrong but I did not see ipv6 requests for a long while.

Last time I changed the listen directive following some recommendation found on the web, I ended up with servers not listening to anything!

Can we replace HAProxy with NGINX (no replies)

$
0
0
Hi,

I have the following HAProxy configuration:

global
log 127.0.0.1 local1
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
---
---

tune.comp.maxlevel 5
defaults
mode http
log global
option httplog
----------
--------
--------
maxconn 3000
# enable compression (haproxy v1.5-dev13 and above required)
compression algo gzip
compression type text/html application/javascript text/css application/x-javascript text/javascript application/json
frontend http-in
bind *:443 ssl crt /etc/ssl/example.com

mode http

http-request redirect scheme https if { hdr(Host) -i example.com } !{ ssl_fc }

acl cluster1_dead nbsrv(service_servers) lt 1
http-request deny if cluster1_dead

acl is_service path_beg -i /Module/service

use_backend service_servers if is_service

default_backend web_servers
backend web_servers
balance roundrobin
option forwardfor

cookie SERVERID insert secure httponly maxidle 60m maxlife 180m indirect

server exampl.com_id example.com:8080 cookie example.com_name check port 8080 inter 1000

backend service_servers
balance roundrobin
option forwardfor

cookie SERVERID insert secure httponly maxidle 60m maxlife 180m indirect
reqrep ^([^\ :]*)\ /Module/service/(.*) \1\ /Module1/\2

server exampl.com_id example.com:8080 cookie example.com_name check port 8080 inter 1000


listen stats :1936
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth haproxy:password

Can the above is possible to do with NGINX?.

Thanks,

Illumos/SmartOS/Solaris issue when using eventport and keepalive at the same time (1 reply)

$
0
0
Hi all,

There is a lock-up issue on Solaris derived operating systems when using
"keepalive" and "use eventport" configuration directives at the same time.

The issue has been described previously back in 2015 and a patch was
proposed here: https://forum.nginx.org/read.php?2,259798,259798#msg-259798

I have tested the patch and it is working.

Could anyone comment on whether the patch looks acceptable in its current
form?
Any objections to applying this fix in the next release?

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

Forum signup process broken - who admins the forum? (1 reply)

$
0
0
Hi,

I absolutely can not sign up at the forum.nginx.org site. I've tried from
many places, my work (a major company) - HK and USA, but no luck. Says I'm
a spammer every time.

Never had this problem before.

Is the forum signup process broken?

Can you pass this along to them?

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

Change target host in proxy_pass (1 reply)

$
0
0
Hello,
I have NGINX acting as reverse proxy and I would like to achieve something
like this:

When I get a request like this GET http://app1.mydomain.aa.com/aaa/bbb it
should be converted to:
GET http://app1.mydomain.bb.com/aaa/bbb so such directive will do the job:

proxy_pass http://app1.mydomain.bb.com;
problem is that I want to convert host part automatically (regex) basing on
incoming requests to NGINX - app1.mydomain are not fixed they are changing
very often.
Is it possible? Can anyone get a clue how proxy_pass statement should look
like?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Using nginx as proxy (4 replies)

$
0
0
Hi all
I am trying to setup a simple confit where tcp traffic coming in at specific port - 12000 need to be send to a specific server:3260
In this case source ip will change (which is fine) but we are seeing on tcpdump that source port is changing from 12000 to some way higher value
The server rejecting the call due to that
How do I setup so the source port remain unchanged?
I will send my config once at work - if needed
Thanks

Get Outlook for iOS
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

proxy_buffering off disable cache ? (1 reply)

$
0
0
Hello all,

Right now we're using Nginx(as a proxy) to serve videos(4gb) and small
objects(< 100k), using Openstack Swift as backend.

Yesterday, I tried turn proxy_buffering off to see if it would improve
nginx performance but it didn't.

However, I realised that nginx stoped to write new files on proxy_temp_path
and proxy_cache_path until I turn proxy_buffering off.


I have two question:

1) Is that a expected behaviour? If I turn proxy_buffering off, nginx will
disable cache and temp files?


2) If proxy_buffering is on, shouldn't nginx recieve the entire response,
before send it to the cliente? Or does it wait only enough to fill the
configured buffers?


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

Error with nginx reverse proxy setup (1 reply)

$
0
0
Hi All,
I am setting my first reverse proxy by following online posts. The problem is that when I type the http://my_ip_address/my_rev and it returns an 404 error:

Not Found
The requested URL was not found on the server.If you entered the URL manually please check your spelling and try again.
Here is what I did:
1. installed nginx 1.10.0 on ubuntu 16.042. created file my_nx.conf under /etc/sites-available with following:
    server {
            listen 80;
            server_name my_ip_address;  

            location /my_rev {
                    proxy_pass http://192.168.1.65:5000;
                    include /etc/nginx/proxy_params;
            }
    }3. Under /etc/sites-enabled, a symlink my_nx.conf was generated pointing to /etc/sites-available/my_nx.conf4. restart nginx
5. On browser, type http://my_ip_address/my_rev and, the error
The configuration seems very straightforward. Where have I missed? Many thanks.
-Jun C





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

Trouble Integrating Moodle on Nginx (1 reply)

$
0
0
I am trying to install Moodle under Nginx but I have run into a snag that's preventing me from completing the install.

I have NginX working under Ubuntu 16.04. PHP is installed at least well enough to run info.php from the root directory. The Moodle browser install works correctly up until the point that it tries to configure the main administrator account. Chrome developer tools shows that a lot of errors are occurring when the page loads. All of the errors are for resources that are requested through PHP pages.

I think the problem may have to do with how I have fast_cgi set up, but I don't know what exactly is wrong. When I run nginx -T I get the following output at the bottom of this note. Can anyone see a problem with the setting that would explain my problem?

Gil Yoder

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
# configuration file /usr/local/nginx/conf/nginx.conf:
worker_processes 1;

events {
worker_connections 1024;
}


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

sendfile on;

keepalive_timeout 65;

include /usr/local/nginx/conf/sites_enabled/*.conf;
}

rtmp {
server {
listen 1935;
chunk_size 4096;

application live {
live on;
record off;
exec ffmpeg -i rtmp://localhost/live/$name -threads 1 -c:v libx264 -profile:v baseline -b:v 350K -s 640x360 -f flv -c:a aac -ac 1 -strict -2 -b:a 56k rtmp://localhost/live360p/$name;
}
application live360p {
live on;
record off;
}
}
}

# configuration file /usr/local/nginx/conf/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 /usr/local/nginx/conf/sites_enabled/default.conf:
server {
listen 80;
server_name 192.168.1.27;

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


location / {
try_files $uri $uri/ =404;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass 127.0.0.1:9000;
}

location ~ /\.ht {
deny all;
}
}

# configuration file /usr/local/nginx/conf/snippets/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;

# configuration file /usr/local/nginx/conf/fastcgi.conf:

fastcgi_param SCRIPT_FILENAME $document_root$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 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;

http/2 for Windows (no replies)

$
0
0
Hi,

Is there a technical reason why the Windows binaries do not include the
http/2 option?

I understand that it's advised to use Linux, but that's not always an
option.

Thanks,


Igal Sapir

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

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

Multitenant invalid configuration reload (no replies)

$
0
0
Hello Everyone,

I had asked this question in stackoverflow (http://stackoverflow.com/questions/42771887/invalid-host-in-upstream-for-multitenant) earlier, but I did not get any response so far, so I wanted to check here.For now, I have a POC which generates tenant config (one per tenant) in a temp destination and then validates using "nginx -t "option and then finally all the good tenant configs are copied to the actual destination and then reloaded.

Is there a simpler solution for the problem mentioned in the stackoverflow thread ?

Thanks in advance.

Regards,
Muhilan

Tomcat EOFException when nginx is Reverse Proxy for WebSockets (3 replies)

$
0
0
I am getting an EOFException after a couple of minutes when connecting
via nginx that acts as reverse proxy.

I am running Windows 2008R2 server, with Tomcat 8.5.12, and nginx 1.11.10

When connecting directly to Tomcat I do not see this issue, but direct
connection is locally (i.e. network connection is not a factor) while
connection via nginx goes over the internet.

My nginx config is as follows:

## WebSocket begin
location /ws/ {

proxy_pass http://lucee_servers_81xx;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
## WebSocket end

Java Stack Trace: java.io.EOFException
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1228)
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1168)
org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:63)
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1441)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)

Any ideas?

I will post a similar question to the Tomcat mailing list. Thanks!
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

NGINX Support for version 1.9.4 (1 reply)

$
0
0
Dear Team,

Kindly confirm if the Nginx version 1.9.4 is still supported. Would
appreciate your response at the earliest possible.

Thanking you in Advance.


Thanks
Rajesh Parameswaran
Axis Securities Ltd.
Landline: 022 42671670
Cell: +91 9619674344

--


"Information contained and transmitted by this E-MAIL including any
attachment is proprietary to Axis Securities Limited and is intended solely
for the addressee/s, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. Access to this
e-mail and/or to the attachment by anyone else is unauthorized. If this is
a forwarded message, the content and the views expressed in this E-MAIL may
not reflect those of the organisation. If you are not the intended
recipient, an agent of the intended recipient or a person responsible for
delivering the information to the named recipient, you are notified that
any use, distribution, transmission, printing, copying or dissemination of
this information in any way or in any manner is strictly prohibited. If you
are not the intended recipient of this mail kindly delete from your system
and inform the sender. There is no guarantee that the integrity of this
communication has been maintained and nor is this communication free of
viruses, interceptions or interference".'. If the disclaimer can't be
applied, attach the message to a new disclaimer message.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

nginx as reverse proxy and custom 500 error (no replies)

$
0
0
Hello,
I use nginx as reverse proxy for my IIS web server.
I have custom error page when 500 error occours.

My goal is to have custom error page for all but detailed error (no custom error essentially) from my specific ip.

It's possible to have detailed error page from my specific ip and custom error page from all others ?
Or ignore error_page directive if error 500 occours and request is from my specific ip ?


Thanks
Manuel

nginx-1.11.11 (1 reply)

$
0
0
Changes with nginx 1.11.11 21 Mar 2017

*) Feature: the "worker_shutdown_timeout" directive.

*) Feature: vim syntax highlighting scripts improvements.
Thanks to Wei-Ko Kao.

*) Bugfix: a segmentation fault might occur in a worker process if the
$limit_rate variable was set to an empty string.

*) Bugfix: the "proxy_cache_background_update",
"fastcgi_cache_background_update", "scgi_cache_background_update",
and "uwsgi_cache_background_update" directives might work incorrectly
if the "if" directive was used.

*) Bugfix: a segmentation fault might occur in a worker process if
number of large_client_header_buffers in a virtual server was
different from the one in the default server.

*) Bugfix: in the mail proxy server.


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

limit_except per user (no replies)

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