Thread Pool HTTP POST issue

2020-12-16 Thread st . gabrielli
Hi,we are doing some tests using the nginx thread pool feature. The scenario is the following:1) the worker process register with ngx_http_read_client_request_body fuction a handler for the request. We can call it "post_handler" 2) the worker process receive a POST bid request. The payload is a

Re: redirect to a .php file with try_files if required .php file not found

2018-03-18 Thread ST
Thank you for the detailed clarification! On Fri, 2018-03-16 at 09:26 +, Francis Daly wrote: > On Thu, Mar 15, 2018 at 01:32:34PM +0200, ST wrote: > > Hi there, > > > maybe I pasted too much of my config, basically the important line is: > > > > t

redirect to a .php file with try_files if required .php file not found

2018-03-15 Thread ST
PS: maybe I pasted too much of my config, basically the important line is: try_files $uri /virtual_new.php =404; Does it look legitim to you? Is it the proper way to redirect in such a case or should I better use rewrite/redirect? Thank you! ---

redirect to a .php file with try_files if required .php file not found

2018-03-14 Thread ST
Hello, I would like to redirect to /virtual_new.php with try_files if required .php file not found, is it the right way to do so: location ~ \.php$ { if ($args ~ "netcat_files/") { expires 7d; add_header Cache-Control "public"; } fastcgi_split_

Re: nginx + php-fpm: REQUEST_URI disappears for files that end with .php

2018-03-09 Thread ST
Hi Francis, you are correct. You explained exactly what happens - thank you! On Fri, 2018-03-09 at 00:01 +, Francis Daly wrote: > On Thu, Mar 08, 2018 at 01:48:41PM +0200, ST wrote: > > Hi there, > > * What request do you make? (e.g. /rus_example.php) > * Does the matc

nginx + php-fpm: REQUEST_URI disappears for files that end with .php

2018-03-08 Thread ST
Hello, I have following nginx + php-fpm configuration but for some reasons files that end with .php miss REQUEST_URI when they arrive to php-fpm. For instance: https://n.example.com/audio/radio/ -> array(1) { ["REQUEST_URI"]=> string(15) "/audio/radio/" } https://n.example.com/rus_example.html -

Re: nginx seems to treat %3F as "?"

2017-11-23 Thread ST
On Wed, 2017-11-22 at 22:11 +, Francis Daly wrote: > On Wed, Nov 22, 2017 at 05:34:13PM +0200, ST wrote: > > Hi there, > > > I have following redirection rule defined: > > > > location ~ "^/(.*)\.html[^\?]+" { > > That says: /anything.ht

nginx seems to treat %3F as "?"

2017-11-22 Thread ST
Hello, I have following redirection rule defined: location ~ "^/(.*)\.html[^\?]+" { return 301 /$1.html; } so that everything besides "?" after an URL gets truncated: like example.com/test.html%D1%80%D0%BE%D1%80%D0%BB -> example.com/test.html however it doesn't work when "?" is url e

Whitelisting files with certain extensions

2017-08-10 Thread ST
Hello, we had following problem: one of the developers has saved a .php file as .php.old. This file, if requested directly, was offered by nginx for download and thus exposed. What is the right way to solve this? 1. initial idea was to whitelist all the legitimate file extensions that we use and

Re: serving certain file for all but one server{}

2017-07-30 Thread ST
:34 -0700, Zhang Chao wrote: > Hi! > > > You can rewrite the uri in the special server {} by the “rewrite” > directive. > > > > On 30 July 2017 at 19:09:27, ST (smn...@gmail.com) wrote: > > > > > Hello, > > > > I have a lot of serve

serving certain file for all but one server{}

2017-07-30 Thread ST
Hello, I have a lot of server{}s with different server_names all over my setup. I want to serve robots_closed.txt instead of robot.txt for all but one domain. And for that one domain, let's say example.org, I want robot.txt to served normally. What is the right way to achieve that without writing

Re: redirect related questions...

2017-07-30 Thread ST
at 20:25 +0100, Francis Daly wrote: > On Fri, Jul 28, 2017 at 02:13:23PM +0300, ST wrote: > > Hi there, > > > server { > > server_name www.example.org example.com; # and some more domains > > return 301 $scheme://example.org$request_uri; > > } > >

Re: redirect related questions...

2017-07-30 Thread ST
s it wrong to have two listen directives in one server? Thank you! On Sat, 2017-07-29 at 20:25 +0100, Francis Daly wrote: > On Fri, Jul 28, 2017 at 02:13:23PM +0300, ST wrote: > > Hi there, > > > server { > > server_name www.example.org example.com; # and some mo

Re: redirect related questions...

2017-07-30 Thread ST
3PM +0300, ST wrote: > > Hi there, > > > server { > > server_name www.example.org example.com; # and some more domains > > return 301 $scheme://example.org$request_uri; > > } > > > > server { > > listen 80; > > server_name example.org; &

redirect related questions...

2017-07-28 Thread ST
Hello, I have several questions related to redirects: Here is my setup: server { server_name www.example.org example.com; # and some more domains return 301 $scheme://example.org$request_uri; } server { listen 80; server_name example.org; ... if ($http_user_agent !~ facebookexternalhit/1.

response headers show wrong time

2017-07-05 Thread ST
Hello, response headers show wrong time: Date: Wed, 05 Jul 2017 19:44:37 GMT while system time is set to 22:44:37 (output of the 'date' from command line). Any ideas where I can set headers' date to system time? Thank you in advance! ST __

Re: Measuring nginx's efficiency

2017-06-29 Thread ST
e that much... > > If you run wrk as suggested below, you will get a bunch of useful data that > will help you chose whichever software solution is the best to use. Do you think I should stress a production server? Thank you! > > > > On 29/06/2017, 19.38, "nginx

Re: Measuring nginx's efficiency

2017-06-29 Thread ST
On Thu, 2017-06-29 at 16:16 +0300, Valentin V. Bartenev wrote: > On Thursday 29 June 2017 15:32:21 ST wrote: > > On Thu, 2017-06-29 at 15:09 +0300, Valentin V. Bartenev wrote: > > > On Thursday 29 June 2017 14:00:37 ST wrote: > > > > Hello, > > > > >

Re: Measuring nginx's efficiency

2017-06-29 Thread ST
On Thu, 2017-06-29 at 15:09 +0300, Valentin V. Bartenev wrote: > On Thursday 29 June 2017 14:00:37 ST wrote: > > Hello, > > > > with your help I managed to configure nginx and our website now can be > > accessed both - through apache and nginx. > > > > Now

Measuring nginx's efficiency

2017-06-29 Thread ST
Hello, with your help I managed to configure nginx and our website now can be accessed both - through apache and nginx. Now, how can I prove to my boss that nginx is more efficient than apache to switch to it? How do I measure its performance and compare it to that of apache? Which tools would yo

Separate logs within the same server for different server names?

2017-06-15 Thread ST
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! ___

several sibling location block

2017-06-13 Thread ST
Hello, I try to convert following apache related stuff: # force download for ceratain file types Header set Content-Disposition attachment Header set Content-type text/fb2+xml Header set Content-type application/x-mobipocket-ebook Header set Content-type audio/mpeg to nginx,

Problems with setting max-age header directive

2017-06-13 Thread ST
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;

nginx equivalent for ExpiresByType / FilesMatch

2017-06-12 Thread ST
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. # set up max-age header directive for certain file types for proper caching ExpiresActive on ExpiresByType text/css A604800 ExpiresB

Re: fastcgi_cache_key

2017-06-10 Thread ST
Hi Francis, On Sat, 2017-06-10 at 07:49 +0100, Francis Daly wrote: > On Fri, Jun 09, 2017 at 04:07:31PM +0300, ST wrote: > > Hi there, > > > I try to understand an example configuration and have difficulties with > > following line: > > > >

fastcgi_cache_key

2017-06-09 Thread ST
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!

back-reference from if() and rewrite?

2017-06-05 Thread ST
Hello, I need to translate following rule from apache to nginx: RewriteCond %{QUERY_STRING} id=([^&]*) [NC,OR] RewriteCond %{QUERY_STRING} daily=([^&]*) [NC] RewriteCond %{REQUEST_URI} !mobSpecCycle [NC] RewriteCond %{REQUEST_URI} !mobSpecTheme [NC] RewriteRule ^rss\/mobSpec([^\/]+)/?$ /rss/mobSp

Re: Redirect http:8080 to https:8443

2017-06-05 Thread ST
Thank you very much! This solved the issue! On Mon, 2017-06-05 at 15:16 +0200, bless...@jacekowski.org wrote: > On 06/05/17T16:01:17 +0300, ST wrote: > > If I clear cache it works sometimes... > > > On Mon, 2017-06-05 at 13:48 +0100, Miguel C wrote: > > > > >

Re: Redirect http:8080 to https:8443

2017-06-05 Thread ST
Thank you for the fast response. curl shows correct output, like yours, however in Chromium/Firefox only http redirects to https while port remains the same - 8080, so I get the error: "This site can’t provide a secure connection" If I clear cache it works sometimes... On Mon, 2017-06-05 at 13:48

Redirect http:8080 to https:8443

2017-06-05 Thread ST
Hello, I try to redirect http on port 8080 to https on port 8443 as follows, but it doesn't seem to work. http redirects to https, but the port remains the same - 8080. Why? Thank you! # redirect http to https server { listen 8080; server_name n.example.com; return 301 https://$host:

Proper way to convert an apache rewrite rule

2017-06-04 Thread ST
Hello, I'm new to nginx and try to move an old website from apache to nginx. While getting rid of the .htaccess file I've encountered following rewrite rule: RewriteCond %{QUERY_STRING} id=([^&]*) [NC,OR] RewriteCond %{QUERY_STRING} daily=([^&]*) [NC] RewriteCond %{REQUEST_URI} !mobSpecCycle [NC]

mp4 video streaming: fast start up, but gets stuck...

2017-02-06 Thread ST
of both ( http://pastebin.com/SuwYZkWP ) and AtomicParsley -T of A ( http://pastebin.com/GRWJkqNy ) and B ( http://pastebin.com/YGq0HjCU ). If you need any additional information, please, let me know. Thank you very much! ST ___ nginx mailing list nginx

auth_basic plain password in html

2015-06-11 Thread de Brouwer Tom (ST-CO/ENG5.1)
All, I have setup aut_basic on my nginx webserver, whenever I authenticate the username and password are send as plain text via the html request from my webbrowser, is there an easy solution for this? Or should I switch to the non default nginx_http_auth_digest module? Thanks, Tom __

verifying that load balancing really works

2015-01-11 Thread ST
Hi, how can I verify that load balancing really works? I have 2 servers with nginx, one of them functions as a LoadBalancer and redirects requests either on itself or on the other server(by default round-robin). When I look on the traffic using jnettop it looks like both servers are loaded(while t

RE: Problems with nginx-extras on Debian Wheezy

2014-12-16 Thread ST
good people from the IRC channel (thresh) solved the problem: I was copy/pasting the config lines from GoogleDocs and it seemingly has problematic chars for spaces which nginx didn't like... Thank you! > Hi, > I have installed nginx-extras on Debian Wheezy. nginx -V shows: > --with-http_mp4_modul

Problems with nginx-extras on Debian Wheezy

2014-12-16 Thread ST
Hi, I have installed nginx-extras on Debian Wheezy. nginx -V shows: --with-http_mp4_module , but if I write mp4; in location / {} it says on restart: nginx: [emerg] unknown directive " mp4" . the same with ssl_protocols directive which I put in nginx.conf - http {} ... Why? Here some