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

RE: Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (no replies)

$
0
0
Thanks for your reply, why calling the ngx_event_expire_timers is
unnecessary when ngx_process_events handler returns so quickly that the
millisecond precision is not enough to display the calling time(less than
1ms maybe).

ngx_process_events handler returns quickly which doesn't
mean ngx_event_process_posted return quickly, maybe it excute for 2 ms or
more
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

[Module] ngx_http_gzip issue : unknown directive "gzip" (no replies)

$
0
0
Hi,

Recently I upgraded my nginx to 1.12 version from 1.10 branch.

The build from source went through without any issues, but while starting
Nginx I am receiving this error:

*>>[emerg] 342#342: unknown directive "gzip" in
/usr/local/apps/nginx/etc/conf.d/gzip.conf:2*

GZIP was working fine on 1.10 so I am really confused what the issue is
here, the GZIP module is enabled by default is my understanding.

Can anybody guide me in the right direction what's the issue here.

Here is my configure script for reference

*LDFLAGS="-L$PPS_PATH/lib" CPPFLAGS="-I$PPS_PATH/include" ./configure \*
* --prefix=$PATH_NGINX/etc \*
* --sbin-path=$PATH_NGINX/sbin/nginx \*
* --conf-path=$PATH_NGINX/etc/nginx.conf \*
* --error-log-path=$PATH_NGINX/var/log/error.log \*
* --http-log-path=$PATH_NGINX/var/log/access.log \*
* --pid-path=$PATH_NGINX/var/run/nginx.pid \*
* --lock-path=$PATH_NGINX/var/run/nginx.lock \*
* --http-client-body-temp-path=$PATH_NGINX/var/cache/client_temp \*
* --http-proxy-temp-path=$PATH_NGINX/var/cache/proxy_temp \*
* --http-fastcgi-temp-path=$PATH_NGINX/var/cache/fastcgi_temp \*
* --http-uwsgi-temp-path=$PATH_NGINX/var/cache/uwsgi_temp \*
* --http-scgi-temp-path=$PATH_NGINX/var/cache/scgi_temp \*
* --user=$thisuser \*
* --group=$thisuser \*
* --with-zlib=$MAIN_SRC/$ZLIB \*
* --with-pcre=$MAIN_SRC/$pcre \*
* --with-openssl=$MAIN_SRC/$OPENSSL \*
* --with-http_ssl_module \*
* --with-http_realip_module \*
* --with-http_addition_module \*
* --with-http_sub_module \*
* --with-http_dav_module \*
* --with-http_flv_module \*
* --with-http_mp4_module \*
* --with-http_gzip_static_module \*
* --with-http_random_index_module \*
* --with-http_secure_link_module \*
* --with-http_stub_status_module \*
* --with-http_v2_module \*
* --with-mail_ssl_module \*
* --with-file-aio \*
* --add-module=$MAIN_SRC/nginx-rtmp-module \*
* --add-module=$MAIN_SRC/ngx_pagespeed-release-$NPS_VERSION \*
* --with-threads \*
* --with-ipv6 && make && make install >> $LOG 2>&1*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Apply nginx rate limits to certain IP addresses, and another rate limit to others (no replies)

$
0
0
In our Nginx config we currently have this:-

limit_req_zone $binary_remote_addr zone=two:10m rate=15r/m;
limit_req zone=two burst=5 nodelay;

Now we want to change this so that this rate limit applies to certain IP addresses, and then have another rate limit that applies to others that is slightly less restrictive.

geo $limited_net {
default 0;
111.222.333.444 1;
}

map $limited_net $addr_to_limit {
0 "";
1 $binary_remote_addr;
}

limit_req_zone $addr_to_limit zone=two:10m rate=15r/m;


geo $less_limited_net {
default 1;
111.222.333.444 0;
}

map $less_limited_net $addr_to_limit_less {
0 "";
1 $binary_remote_addr;
}

limit_req_zone $addr_to_limit_less zone=three:10m rate=25r/m;

So the traffic from the IP 111.222.333.444 will be affected by the rate 1st more restrictive rate limit, and not by the second less restrictive one.

Does this give me what I want?

Nginx reverse proxy with Sharepoint web (no replies)

$
0
0
Hi Guys,

I am kindaa facing an issue with sharepoint sub-sites authentication with nginx as a reverse proxy. Somehow primary site is perfectly getting authenticated with upstream and ntlm however subsites shows 401 and 404 error.

Does anyone have any use case or working configuration with sharepoint and nginx as reverse proxy?

Thanks and Regards,
Blason

Announcing crossplane (no replies)

$
0
0
Hey,

We on the NGINX Amplify team made an NGINX configuration parser tool. It's
named "crossplane" and it's distributed as a Python package.
It's under the Apache 2.0 License and it lives here:
https://github.com/nginxinc/crossplane.
Feel free to check it out, mess around with it, and to use it in your
projects. Also, we'd be happy to hear your feedback if you have any.

Thanks,
Arie

--
Arie van Luttikhuizen
SaaS Developer
San Francisco, CA
https://nginx.com/
https://www.linkedin.com/in/https://www.linkedin.com/in/arie-van-luttikhuizen-636634100/
https://twitter.com/https://twitter.com/arieluttik

https://www.facebook.com/nginxinc
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Beginner question - TCP or Sockets ? (2 replies)

$
0
0
I'm new to Nginx and the technology in general. I have spent some time on nginx.org. The one thing I'm not sure of is if I need to configure my web server, which is Thin (ruby), with sockets or should TCP be enough. The reason I ask is because a number of tutorial and blog posts seem to say that the two servers can communicate via tcp but at the same time most setups seem to be done with sockets.

I'm looking for Nginx to serve static files, specifically media files, but not anything that resides in my site's public folder. Anyway, to repeat, do I need sockets set up or should tcp be enough. So far tcp has not worked for me. Thanks for any advice , direction.

streaming video to mobile phones (3 replies)

$
0
0
I'm running nginx-1.12.2 on a centos 6 server and I've had success
with it streaming live video to a mobile phone. I followed the
instructions here:
https://www.vultr.com/docs/setup-nginx-on-ubuntu-to-stream-live-hls-video
this page uses mpegurl m3u8 as the streaming protocol. My question is
are there any other protocols that work with mobile phones? And how
would I specify that in nginx.conf? I've tried webm to ffserver but
only got video on a computer. Thanks for any advice.
ps: I've left the live stream running and I'd appreciate feedback on
whether your phone can play the video (or not) at:
http://198.91.92.112/hls.html. Please let me know if it plays for you
or not and what kind of phone you have. Thanks again.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Possibly missing something in my conf file? (no replies)

$
0
0
I'm a bit confused about what it is I need to get Nginx to serve requests from my app server. I'm running inside a Vagrant box Ubuntu. Nginx runs on guest 80 and the server can be acccessed on 8080, while my app server (Thin) runs on guest 8000 and host 4567. Both are either localhost or 127.0.0.1.

Problem is I am not seeing anything going on between the two servers. I can see my conf file played out if I go to localhost:8080, but nothing with port 4567.

The reverse-proxy description doesn't sound like something I need since I have no upstream servers. All I want to do is serve up certain files that exist outside of the site directory / public from another directory on my machine. TCP sockets is what I'm trying but I must be missing something.

This is what I have so far in my conf file

user vagrant;
worker_processes 1;
error_log /var/log/nginx/error.log debug;
pid /run/nginx.pid;

events {
worker_connections 1024;
}

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

include /etc/nginx/mime.types;


server {
listen 80;
server_name 127.0.0.1:8000;
rewrite_log on;

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

location /audio/ {
root /;
sendfile on;
autoindex on;
tcp_nodelay on;
keepalive_timeout 65;
}
}
}

Re: Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (Valentin V. Bartenev) (no replies)

$
0
0
Thank you very much, but I have another question, if delta larger than 1ms,
it will excute ngx_event_expire_timers, how do you get the value? why not
2ms or others?
if there are much events comming for 30s, and epoll_wait return quickly(linux)
which less than 1ms in each circle,
and the ngx_event_expire_timers will not be excecuted for 30s?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

proxy_pass $arg_uri Do not decode URL (no replies)

$
0
0
nginx 1.12.2

I have a location rule like this to proxy external images:

location /imagesproxy {
resolver 8.8.8.8;
proxy_pass $arg_uri;
proxy_pass_request_headers off;
}

The problem is that nginx doesn't seems to decode the URI

/imagesproxy?uri=http%3A%2F%2Fwww.example.com%2Fwp-content%2Fuploads%2F2015%2F07%2Fportada-otra-vez-tu-667x1000.png

error.log:
[error] 16159#16159: *3602114 invalid URL prefix in "http%3A%2F%2Fwww.alicekellen.com%2F

Any ideas?

Thank you!

random load balancer (no replies)

$
0
0
Hello,

I’m experimenting with nginx module development by trying to implement a random load balancer.

I see that *us->servers->nelts matches the upstream servers defined in nginx.conf

However, something that’s confusing to me is where *us->elts[0]->naddrs comes from.

My thinking was that I could chose a random integer and select a peer by indexing it.
This doesn’t work reliably because the “real” webservers are only accessible every two indexes such as: &peer[0] => foo.example, &peer[3] => bar.example, and &peer[6] => baz.example, etc.

I’m having trouble finding why this is the case and any advice would be appreciated.

Thanks!
-Adam_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Proxy Request buffering not working as expected (2 replies)

$
0
0
If I try to upload a 200M file using POST method, nginx will pass chunks
to back-end in less than 3 meg chunks


sample nginx config:

worker_processes auto;
user nginx;

events {

}

http {
    upstream servers {
        server                127.0.0.1:9999;
    }



 server {
   listen 80;
   client_max_body_size 200M;
   client_body_buffer_size 200M;

   server_name           localhost;

        location / {
            proxy_request_buffering   on;
            proxy_pass http://servers;
        }

 }
}


a quote about proxy_request_buffering  from docs:

"""When buffering is enabled, the entire request body is read from the
client before sending the request to a proxied server"""


but this behavior which I am facing is the opposite of this quote, any
ideas what's going on ?

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

Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (Valentin V. Bartenev) (2 replies)

$
0
0
Thank you very much, but there is another question, if delta larger than
1ms, it will invole the ngx_event_expire_timers, why not 2ms or others? how
do you get the value?
if there are much events comming for 30s, and epoll_wait return quickly
(linux) which less than 1ms in each circle,
and the ngx_event_expire_timers will not be excecuted for 30s?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (Valentin V. Bartenev) (no replies)

$
0
0
Thank you very much, I did't see your reply in my email list or I ignored
it, so I send twice, sorry, I got it. Thank you. Thank you.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Conditional $uri and html from file (no replies)

$
0
0
I am using lua to parse out the username of the posted form and if the
username == user and password == password.

I want to change the URI to http://www.somesite.com//forum/unauthorized.html

otherwise, I want it just to do:

proxy_pass http://$http_host$uri$is_args$args;
(http://somesite.com.com/forum/ucp.php?mode=login)

The unauthorized.html is located in /data/www/ on the nginx server.

Here is my nginx.conf:


http {


include mime.types;

default_type application/octet-stream;


sendfile on;

keepalive_timeout 65;


gzip on;


server {

listen 80;


location / {

resolver 8.8.8.8;

lua_need_request_body on;


content_by_lua_block {

ngx.req.read_body();


local post_params = ngx.req.get_post_args();

local username;

local password;


if (post_params) then


-- Iterate through post params


for key,value in pairs(post_params) do

if (key == "username") then

username = value;

elseif (key == "password") then

password = value;

end


-- ngx.say(key," : ", value);

end


if (username and password) then

-- ngx.say(username);

-- ngx.say(password);

if (username == "user" and password =="password") then

*-- WHAT DO I DO HERE ?*

end

end

end

}


proxy_pass http://$http_host$uri$is_args$args;

}

}

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

Does anyone know how to configure the session inactivity timeout in Nginx ? (no replies)

$
0
0
Does anyone know how to configure the session inactivity timeout in Nginx ?

Thanks,

ngx.shared.DICT serialize / deserialize (no replies)

$
0
0
I am trying to load a table from disk (deserialize) into memory and then
add, change, remove the values in the table then write it periodically back
to disk (serialize). I looked at the documentation for the ngx.shared.DICT (
https://github.com/openresty/lua-nginx-module#ngxshareddict) and it seems
like it would fit my needs but I do not see anywhere in the documentation
how to load the table initially from disk and modify then write back to
disk. Could someone provide a basic example of how I might accomplish this ?

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

NGINX lifecycle (no replies)

$
0
0
I want to load a table of key/value pairs from the file system when nginx
starts and not every time a request comes in. I am going to use the
key/value pairs to compare against incoming post args in my location block.

My question is how many times is init_by_lua_block called ? or is there
somewhere else I should be loading the file ?

server {
init_by_lua_block {
some_global_var = stuff from file io read;
}

location \ {
...
}
}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

The "worker process is shutting down" is running all the time, How should I do? (1 reply)

$
0
0
Hi,


The nginx is http proxy. when I use upgrade websocket and send heartbeat
per 5s(client_body_timeout 6s;) the directives "worker_shutdown_timeout" is
invalid, the "worker process is shutting down" produced by nginx -s reload
is running all the time.

How should I do?

Regards,

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

Enabling both gzip & brotli (2 replies)

$
0
0
Hello. Can I enable both brotli & gzip?
brotli on;
gzip on;

with the idea to support both newer & older clients, but still not do any kind of double compression.
Thanks.
Viewing all 7229 articles
Browse latest View live


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