Questions tagged [nginx]

Nginx ("eNgine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

4,547 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
2answers
1k views

nginx try_files redirect using wrong scheme when behind SSL termination load balancer (haproxy)

I have an nginx 1.6.2 server running as a backend behind a load balancer that does SSL termination. All communication to the backend servers goes over HTTP. Diagram of what's going on: /--...
7
votes
0answers
1k views

NGINX Dynamic Port proxy_pass

I need a way to proxy_pass a dynamic port through the location's URL. The proxy has the same IP but the port changes since the servers are created via docker on random port numbers. (Too many for me ...
7
votes
1answer
2k 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
2answers
4k views

uwsgi queue of socket message flood?

I found my website unresponsive and I see a ton of *** uWSGI listen queue of socket "0.0.0.0:5002" (fd: 3) full !!! (101/100) *** *** uWSGI listen queue of socket "0.0.0.0:5002" (fd: 3) full !!! (...
7
votes
2answers
3k 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
1answer
785 views

Nginx: Optimizing server response time for a HTTP cached website

I have a website with all of the pages served from nginx’s http cache and rarely invalidated or expired. The average total page download size is around 2 MB But despite being a static site with no ...
6
votes
0answers
169 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
1answer
21k views

upstream prematurely closed connection while reading response header from upstream 502 Bad GateWay

nginx is killin me.. so right now I have 502 Bad Gateway. error log says: 2016/10/12 17:39:53 [info] 3023#0: *464 client closed connection while waiting for request, client: 127.0.0.1, server: 0.0.0....
6
votes
1answer
4k views

Nginx reverse proxy in docker container - wrong IP logged

I am running Nginx in a Docker container as a reverse proxy using the configuration below. It basically redirects the request to another docker container running on the same machine Problem The ...
6
votes
1answer
3k views

Cant connect to S3 with nginx

im trying to serve static and media files from amazon S3 bucket but nginx cant connect to it Here is the error i get <Error> <Code>AccessDenied</Code> <Message> AWS ...
6
votes
0answers
1k 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): *** ...
6
votes
1answer
803 views

Nginx cache unmanaged growth

We have two Nginx servers with independent local caches for caching images. Periodically there is problem with unmanaged growth of cache's size. This size may be far larger than max_size in nginx.conf....
6
votes
1answer
19k views

nginx recv() failed (104: Connection reset by peer) while reading response header from upstream

I have recently upgrade my magento from 1.5 to 1.9 and when ever I add a certain product to basket, I started to receive this error: 502 Bad Gateway There were no log entries in the var/log/ folder: ...
6
votes
1answer
2k 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 ...
6
votes
5answers
3k 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
2answers
3k views

How do I pass headers from nginx X-Accel-Redirect back to the browser?

I'm using the nginx X-Accel-Redirect feature where a proxied backend (A) can "internally redirect" nginx to reprocess a new URI (B) as if that were the one originally given by the client browser. It ...
6
votes
1answer
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
1answer
592 views

Setting nginx reverse proxy with rewrite to apply to all links in site

I have the following Nginx config: server { listen 80; location /test { rewrite /test(.*) /$1 break; proxy_pass "http://www.example.com/"; } } This works well for the ...
5
votes
0answers
2k views

nginx deny ip - access forbidden by rule in error log

We having blocked some bad bots which relentlessly try to access our site via "Deny" directives in NGINX. It's not possible for us to block it at the firewall, as we use a load balancer that we have ...
5
votes
0answers
2k 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. ...
5
votes
0answers
2k views

Nginx reverse proxy with dynamic port forwarding

I'm setting up a reverse proxy on Nginx. I need it to listen to multiple ports. I then would like to hit the exact same port on the backend server. Like this: http://frontendserver:9000 -> http://...
5
votes
0answers
15k views

chrome requests get stuck pending

Description of issue We have a web server that is serving static assets. We are experiencing a problem where after you browse around some of the http requests get stuck in the "pending" state. In the ...
5
votes
0answers
3k 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
1answer
4k views

nginx & php-fpm [debug] 11: Resource temporarily unavailable

New Development The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is : memory_size 1024; so it's not php's memory limit. I've also ...
5
votes
0answers
1k 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
1answer
759 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 ...
5
votes
0answers
2k 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 ...
5
votes
1answer
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 ...
5
votes
0answers
903 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
0answers
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 ...
5
votes
2answers
4k 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
2answers
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
2answers
5k 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
0answers
87 views

accessing nginx server not from all hosts possible

I have the following problem that not all my PCs can access the kcam7.local where a nginx server (port 8080) is running. First of all here is the network configuration: So, it is no problem to access ...
4
votes
1answer
286 views

How to make Certbot ignore a particular domain in nginx?

I have ~30 domains running on my server, all of them with SSL certificates managed by the Certbot nginx plugin. All of them, except one... let's call it selfsigned.example.com. This domain uses a ...
4
votes
0answers
409 views

Is it possible to disable clients not supporting SNI in nginx?

By default nginx serves https requests with multiple certificates by using SNI. The fallback for clients not supporting SNI will be the default_server or first vhost which has been configured. I want ...
4
votes
0answers
299 views

Copy nginx cache between two servers

I have a nginx caching server with at least 2tb of cache files at any moment, i need to migrate this server to another hosting provider but none of my clients can handle that traffic without cache. ...
4
votes
0answers
555 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 ...
4
votes
0answers
360 views

REQUEST CACHING IN NGINX

I am trying to cache my requests in nginx. I have connected my django server as upstream. Now, I am trying to cache my requests. proxy_cache_path /var/cache/nginx/ keys_zone=one:10m; location / { ...
4
votes
0answers
1k views

`nginx reload` and `nginx -t` very slow - how to investigate

I have a quite small VPS on AWS (EC2 t2.nano) that is running an nginx server. while sometimes a sudo service nginx reload or nginx -t is blazing fast, most of the time it is horribly slow (>60 ...
4
votes
2answers
185 views

SSL on both ELB and server

I configured my ELB to be able to serve ssl pages by putting my certs in the ELB itself. Say the ELB serve requests from www.example.com. At the same time i need to use ssl outside the ELB and serve ...
4
votes
0answers
1k views

500 internal error when setting up reverse proxy for Wikipedia

Access to Wikipedia can be disturbed randomly in my country Running Debian 7 with nginx 1.2.1 with additional ngx_http_substitutions_filter_module use several sub-domains to reverse proxy ...
4
votes
0answers
1k views

How do I convert Nginx location rewrites to Apache

I have a site that was running using nginx but now it is apache Im trying to convert nginx to apache and have had no success This is the nginx file I want to convert to apache: server { listen ...
4
votes
1answer
2k 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 ...
4
votes
0answers
764 views

HAproxy and nginx RTMP

I am trying to use HAproxy in front of an RTMP nginx server. It does connect but it does not play the video. I have 2 servers: one with nginx using RTMP and another one with HAproxy. This is the ...
4
votes
0answers
825 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 ...
4
votes
0answers
537 views

Suddenly started experiencing enormous wait times before requests hit server

Our web app has been getting 20k-30k views a day, and steadily growing. About 4 days ago we suddenly started seeing wait times of 30-40 seconds before the HTML was even being delivered, on pages that ...
4
votes
0answers
1k views

Forward Kerberos Authentication on Ansible

I have an ansible control machine (host-A) that need to talk with host-C, an Windows machine that doesn't have local users (It's an Active Directory). host-A doesn't have network access to host-C, ...
4
votes
0answers
3k views

rails server using nginx + puma on ubuntu - suddenly get socket connect failed errors

I have ran jruby on rails in AWS ubuntu trusty 14.04 configuration. my server was going well during several hours. but suddenly get socket connect failed error. -nginx error.log 2016/03/12 10:12:10 [...
4
votes
0answers
3k views

How to configure NGINX proxy_pass with Angular 2 PathLocationStrategy

I am currently serving my Angular 2 front-end with PM2, running at a the ip address http://198.xxx.xxx.xx:8080/. When using Angular 2's HashLocationStrategy, non-root paths reload fine. When using ...

1
2 3 4 5
91