Unanswered Questions

5,923 questions with no upvoted or accepted answers
8 votes
1 answer
3k views

nginx lua: os.execute waitpid() failed (10: No child processes)

So, I'm trying to execute a script on every request. I know how that sounds, this is for development environment. I've added this to my nginx config access_by_lua_file "/opt/nginx/git-magic.lua"; ...
7 votes
0 answers
10k views

nginx proxy_pass one file

I have a single file that I want to appear to host but that I don't. So I write this in my nginx server block: location /d-p27.js { proxy_pass https://data.example.com/p/piwik.js; } After ...
7 votes
1 answer
5k views

Use of "sub_filter" in "IF" block under nginx config

I have nginx as reverse_proxy server for multiple applications running behind on various application servers. I want induce specific html/script into response content for set pre-registered urls. ...
7 votes
0 answers
2k views

UWSGI SIGINT/SIGQUIT received

I'm trying to use nginx with uwsi. I wrote uwsgi ini file and test it with uwsgi --ini site.ini Everything works fine. But when I try to run the site I got the following error (from log file): *** ...
7 votes
1 answer
3k views

How to debug CGI over fcgiwrap/nginx

I serve executable scripts (mainly in C) through fcgiwrap connected with nginx. Since the scripts are complied, I can get the coding errors during compilation, but sometimes I receive CGI errors ...
7 votes
1 answer
4k views

Python Threads and uWSGI Harakiri

I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few ...
7 votes
2 answers
4k views

Nginx HTTP2 IOS 11 not working

i have problems with HTTP2 protocol on my NGINX server, this is my configuration listen 443 ssl http2; server_name adomain.com; root /var/www/project; limit_req zone=one burst=60 nodelay; ...
6 votes
0 answers
10k views

SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client:

A few months ago I started getting complaints from dozens of users about getting errors when connecting to my site. When I look into the error.log of nginx I see daily SSL errors: I have no idea what ...
6 votes
0 answers
17k views

What is the nginx Variable for a custom Header?

A client is sending a custom HTTP Header X-ABC-LOGIN-NAME to my Nginx reverse proxy. To be sure that it is actually arriving, a PHP server (fastcgi) was installed and this header is really showing up (...
6 votes
0 answers
329 views

How can one php-fpm 5.6 site cause an outage across all sites?

I have a real head scratcher with one site on a server affecting others in separate php-fpm pools. I thought the idea was that php-fpm pools gave isolation to stop (reduce) this from happening. We ...
6 votes
0 answers
10k views

Nginx proxy_pass reverse proxying behind corporate firewall

Has anyone any idea of how to setup nginx behind a corporate firewall, to reverse proxy requests to servers outside the firewall? The reason I want to do this is I am trying to use an application ...
6 votes
1 answer
1k views

Why isn't puma using all of its threads?

I'm using puma and nxinx, and as far as I can tell it is only ever using a single thread even when I start it with the default of 16 threads or more. I've set up a fresh rails app, then gone through ...
6 votes
0 answers
3k views

Nginx returning 408 error with XHR2 file uploads during mid-upload

A customer of mine is trying to upload a file to our remote nginx webserver via a form POST using XHR2 form data (and a cross-domain request with CORS). During mid-upload, the webserver returns a 408 ...
6 votes
1 answer
2k views

Using nginx: require authentication when request from public IP, not needed when local

I wrote a simple file browser app which is served using node on port 3000. I use nginx as a front-end which proxies this service. This is on my home server. I would like to be able to require basic ...
6 votes
5 answers
5k views

Creating a fallback error page for nginx when root directory does not exist

I have set up an any-domain config on my nginx server - to reduce the amount of work needed when I open a new site/domain. This config allows me to simply create a folder in /usr/share/nginx/sites/ ...
6 votes
0 answers
2k views

nginx sticky sessions / ip_hash with Socket.io

I am to be load balancing two node.js/Socket.io instances on different boxes with nginx running a simple notifications service with a retroactive event for new clients. I don't think there will be ...
6 votes
1 answer
4k views

nginx regex characters that require quoting?

So I was configuring nginx today and I hit a weird problem. I was trying to match a location like this: location ~ ^/([0-9]+)/(.*) { # do proxy redirects } ...for URLs like "http://my.domain.com/...
5 votes
1 answer
1k views

"upstream sent too big header while reading response header from upstream" error - Increasing buffers not working

I've set up the Bitnami Nginx Open Source Stack at AWS. I've started creating an application using auth0 as my authentication service. After successful login, the code must be exchanged for an access ...
5 votes
0 answers
877 views

Client-side caching when using CSP with nonces in nginx - how do you use weak caching validators/etags?

I'm using nginx's expires directive; its etag directive as well as the Last-Modified header (if I understand correctly) are on by default. In order to allow specific inline JavaScripts when using ...
5 votes
0 answers
2k views

Using proxy_pass with a socks5 proxy in nginx

I want to host a service, and then connect to it using a specific proxy when it is accessed via specific domain. Like it's shown here: | # User make a request to s2.example.com |__ s2.example.com &...
5 votes
0 answers
2k views

NGINX auth_request and 302 response status = 500 invalid URL prefix

I'm trying to make NGINX authenticate requests with OAuth2 server (authorization code flow) that will redirect client to the login page. Is it possible to use auth_request directive for that? Here is ...
5 votes
2 answers
2k views

Nginx: Rate limit failed basic auth attempts

Given a simple HTTP Basic Auth setup in Nginx (1.14.1 at time of writing) like this: server { ... location / { auth basic "HTTP Auth Required"; auth basic user file "/path/to/htpasswd"; ...
5 votes
0 answers
849 views

NGINX-RTMP Load Test

I use Roman Arutyunyan's NGINX-RTMP module with RTMP as input and HLS as the output. How can I load test it? I want to know how much load the server can handle both from simultaneous streaming and ...
5 votes
1 answer
2k views

Nginx does not update max-age

If I make a request to a Nginx-proxy server configured to cache an upstream I get the following response headers: {'content-length': '13200000', 'x-cache-status': 'MISS', 'server': 'nginx/1.9.9', '...
5 votes
0 answers
1k views

What SELinux type should I apply on my Unix socket?

I have a Gunicorn socket file: /opt/rtd/gunicorn/run.sock. I need nginx to be able to open this socket and write to it. When I run sesearch --allow -s httpd_t | grep unix_stream_socket I noticed that ...
5 votes
1 answer
4k views

How to create subdomains using nginx and proxy_pass for each

I currently have nginx setup for my server at my.server.com. Using the current configuration I access different applications using http://my.server.com/app1 or http://my.server.com/app2. I have an ...
5 votes
1 answer
3k views

exclude IP from nginx access log

How to exclude some IP address from access log? This is my config: server { listen 443 ssl; [...] access_log /var/www/web/log/access.log; error_log /var/www/web/log/error.log; location / { ...
5 votes
0 answers
2k views

client_body_buffer_size threats

in my current nginx configuration I got: client_max_body_size 100M; client_body_buffer_size 1M; client_max_body_size I need to be set so big. Unlucky I often got notices when ppl ...
5 votes
1 answer
4k views

Nginx in front of Varnish sometimes produces "upstream prematurely closed connection while reading response header from upstream" error

I have Nginx(1.9.9) on front of Varnish(4.1.0) on the same server. //nginx upstream varnish { server 127.0.0.1:8391; keepalive 16; } location ~ \.php$ { proxy_pass http://varnish; ...
5 votes
0 answers
5k views

Why using "root" is better than using "alias" in nginx configuration?

All the posts I went through agree that using root and alias directives can sometimes lead to similar results, as in the following example: Using the alias directive: location /images/ { alias /...
5 votes
1 answer
3k views

Preventing PHP-FPM from crashing under light load

I'm getting a DoS attack on a wordpress site that I host. 173.192.109.118 - - [30/Sep/2015:22:31:36 +0000] "POST /xmlrpc.php HTTP/1.0" 499 0 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)" ...
5 votes
1 answer
2k views

NGINX Unicorn 504 Gateway Time-out

I try all what I found in the Google by this question, but - nothing. It doesn't work anyway. My NGINX default: upstream app { server unix:/tmp/unicorn.rails.sock fail_timeout=0; } server { ...
5 votes
0 answers
4k views

Unable to apt-get install nginx-extras package on top of nginx 1.7.9

I am attempting to install Phusion Passenger for nginx on a dev Ubuntu box following this guide from the passenger website. I have Nginx installed and running already, version is 1.7.9-1~trusty. I ...
5 votes
1 answer
4k views

Unicorn workers timing out intermittently

I'm getting intermittent timeouts from unicorn workers for seemingly no reason, and I'd like some help to debug the actual problem. It's worse because it works about 10 - 20 requests then 1 will ...
5 votes
0 answers
2k views

Access website hosted on same server as VPN via the VPN

I have just finished setting up a OpenVPN server running on Ubuntu 12.04 and I have been able to connect to it from my own computer (the client). I am able to set up the VPN server to route ALL ...
5 votes
1 answer
2k views

Nginx & fcgiwrap, logging perl errors to error log

This is similar to this question, which got no responses: How to debug CGI over fcgiwrap/nginx How do I get perl errors to be automatically placed in the nginx error log? Right now, when there is any ...
5 votes
2 answers
2k views

nginx proxy_cache: limit parallel requests for the same URL

We're using nginx as a reverse proxy to get files from upstream servers. The files are not dynamic – at least not on a per request basis – and are (sometimes) behind high latency. I would like to ...
5 votes
2 answers
10k views

Nginx dynamic upstream configuration / routing

I was experimenting with dynamic upstream configuration for nginx and cant find any good solution to implement upstream configuration from third-party source like redis or mysql. The idea behind it ...
5 votes
0 answers
1k views

NGINX mod _proxy_html available?

Somebody created already a similar http://apache.webthing.com/mod_proxy_html/ mod_proxy_html module for Nginx? I think the closest module would be http://wiki.nginx.org/HttpSubsModule but I have no ...
5 votes
2 answers
2k views

How to setup Proxy Cache with Nginx and Passenger

I use Nginx and Passenger for my rails application. I want to use proxy cache to cache my pages. However, every request go direct to my rails application. I don't know what wrong with my configuration....
5 votes
2 answers
6k views

Optimize php-fpm and varnish for a powerful server

My setup is Intel® Core™ i7-2600 and RAM 16 GB DDR3 RAM varnish+nginx+php-fpm+apc for a not very heavy WordPress blog with W3 Total Cache and CDN My problem is that after 55 hits per second ...
5 votes
2 answers
3k views

Nginx Multiple Domains

I am trying to add a second virtual host to nginx. When i go to the new domain it redirects to the old one. I have tried restarting Nginx, rebooting the server. Has anyone come across this before, ...
5 votes
1 answer
3k views

Is there an nginx variable for the unresolved upstream server address?

When using nginx as a reverse proxy to a group of servers in an upstream block, is there a variable that corresponds to the unresolved server name? For example, consider the following configuration: ...
5 votes
2 answers
6k views

Nginx + PHP-FPM Timeouts, almost zero load consumption?

I've got a server running on a Linode with Ubuntu 10.04 LTS, Nginx 0.7.65, MySQL 5.1.41 and PHP 5.3.2 with PHP-FPM. There is a WordPress blog on it, updated to WordPress 3.2.1 recently. I have made ...
4 votes
0 answers
4k views

NGINX 502 Bad Gateway error inside Docker container

I haven't had any issues with my Docker container or NGINX until today where I am getting a random unexpected 502 Bad Gateway error even though I have made no changes to my configuration files, Docker ...
4 votes
0 answers
460 views

Drop connections with a mismatching client certificate CN in nginx TCP reverse proxy

I'm using nginx to add TLS functionality on top of an existing TCP server (Redis) by proxying it like so (please read on before saying "Redis has builtin TLS support"): stream { server { ...
4 votes
0 answers
4k views

ngnix php curl old SSL session ID is stale, removing

I am making a php curl request from nginx server to apache server It shows old SSL session ID is stale, removing As per the link I have changed the SSLSessionCacheTimeout in bitnami apache server but ...
4 votes
0 answers
688 views

Nginx not always serving js and css when load balancing between docker containers - works on refresh

I have Nginx set up as a reverse proxy load balancing between two docker containers running all on the same server. When loading a page for the first time, the page loads but I get lots of 404 errors ...
4 votes
1 answer
7k views

Connect to postgres database behind nginx reverse-proxy using docker containers

I have set up a postgres database container and can connect and query it directly using its published port 5434. The goal is to deploy the test database later and access it via nginx reverse proxy. I ...
4 votes
0 answers
5k views

Access to nginx stream proxy is not logged in access_log file

Thanks for checking my question. I'm trying to log user access from browser, into access_log file which is not working now. My system : [User]-[TCP proxy]-[webserver] nginx/1.6 in AWS EC2 nginx ...

15 30 50 per page
1
2 3 4 5
119