Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

8
votes
0answers
6k views

When to use or not to use sendfile on/off in Nginx?

We have this setting in our nginx.conf for quite a while. sendfile on; When we have updated a file e.g. /js/main.js and access from browser https://test.com/js/main.js?newrandomtimestamp, it will ...
7
votes
0answers
137 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
0answers
3k views

nginx and https: nginx: [emerg] host not found in upstream

First of all excuse me if this problem is simple. I have a server with Ubuntu and nginx on it. Always works while http used, but after I added certificates and tried to enable https I received this ...
5
votes
0answers
1k 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
897 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): *** ...
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
0answers
864 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 ...
4
votes
0answers
205 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
323 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
0answers
926 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
956 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
0answers
616 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
767 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
485 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
919 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

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 ...
4
votes
0answers
665 views

Identifying bottleneck with nginx VPS load testing

I'm trying to optimize a Digital Ocean droplet (512mb), testing using loader.io I'm testing on my homepage, which is HTTPS / PHP. I setup FastCGI page cache, which got me from 100 req/sec to 2,000 ...
4
votes
0answers
1k views

Nginx proxy with varying source address

I have a working nginx configuration to proxy all requests to a server from a range of source IPs. I currently have 20 source IPs set up, and the configuration is quite massive. I removed the other 18 ...
4
votes
0answers
5k views

Set CORS headers on nginx

Addresses like http://vpsxxx.ovh.net/g/search?q=ok or http://vpsxxx.ovh.net/so/questions/34738694/how-to-move-items-on-the-screen-for-a-game-using-javascript are proxied well, when trying them from ...
4
votes
0answers
11k 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 ...
4
votes
0answers
159 views

NGINX Worker Process, Burst Read Speed to only 1918kb/s

I am running an NGINX/1.8 server on Centos6.6 with multiple worker_processes, however while observing iotop I notice they burst up to 1918kb/s Read speed and rarely if at all pass that limit. I want ...
4
votes
0answers
192 views

Nginx setup on aws - redirecting to port 81, cannot reverse

I've tried to setup nginx on my free AWS instance so that it can host multiple domains on single ip address (not sure if it can be managed, but I'm trying to dig in). In that process I created ...
4
votes
0answers
1k views

Execute lua script after getting response from proxy pass

I have nginx block which proxy passes the request to different load balancers based on the request by first calling a lua script. location / { set $provider_key null; set $cached_key null; set $...
4
votes
0answers
1k views

400 bad request from a proxy cache

So we have an nginx proxy cache that is used to maintain uptime even if npm goes down. On occasion this server (noticeably once every few months) starts returning 400 bad request for every response ...
4
votes
0answers
4k views

Docker PHP-FPM & NGINX

I'm having an issue with my containers communicating to each other. The linking of the containers is working but the php-fpm process isn't working. php container = 172.17.2.106 nginx container = 172....
4
votes
0answers
842 views

Can nginx set 'Origin' header when proxing websocket?

We know nginx can proxy WebSocket since version 1.3.13, and we also know some times WebSocket server will valid the 'Origin' header, so someone said you can do something like: proxy_set_header Origin ...
4
votes
0answers
303 views

Rails 4 Unicorn+Nginx on Ubuntu 13.04 VPS keeps crashing

I bought a years subscription at bluevm.com (found some coupon code, it was only about $15 for a whole year) to launch my first Rails Production server. I'm running Nginx with Unicorn and MySQL on ...
4
votes
0answers
2k views

UWSGI is not creating my socket

So, i'm getting an error because my .sock file is not being created by uwsgi. I'm also running a VB with vagrant. my uwsgi.ini [uwsgi] master = true pidfile = /tmp/uwsgi-%n.pid workers = 12 enable-...
4
votes
0answers
6k views

Nginx websocket 502 bad gateway

I'm trying to use nginx as proxy for websocket nodejs server, but I'm always getting 502 bad gateway. my domain config: upstream server { server 127.0.0.1:8090; } server { listen 8085; ...
4
votes
0answers
1k views

Character encoding of file names with autoindex at webserver on windows

I have set up a webserver on windows 8.1. Now i am having problems with the character encodings of links: There are directories and file names containing german umlauts (ä ö ü ß). The autoindex ...
4
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 ...
4
votes
0answers
1k views

Ubuntu Locales Incorrect for Python Application

I have a NGINX -> UWSGI -> Django(python) stack installed on an Ubuntu AMI on Amazon EC2. I've run into a problem when accessing a file with unicode characters in the name. The exact output from the ...
4
votes
0answers
2k 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 ...
4
votes
0answers
409 views

Nginx doesn't rebound from 502 Bad Gateway

We have a situation where a site starts to serve a 502 Bad Gateway but doesn't seem to recover after the upstream servers rebound. The nginx server is setup to proxy/load balance requests for two ...
4
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 ...
4
votes
0answers
1k views

nginx equivalent to Apache MultiViews?

If you put this in your .htaccess file Options MultiViews and you have these files stuff/ howto.html index.php items.php then all of these web addresses work /stuff/ # ...
3
votes
0answers
30 views

Need to rewrite domain with specific criteria on Nginx

I have a server with multiple domains pointing to it (it has Wordpress Multisite running on it). One of those domains (e.g., mydomain.xxx) I need to redirect to another domain, which is on a ...
3
votes
0answers
129 views

trying to understand something about nginx status: “writing” connections greater than “active” ones

So on this graph, can someone explain why the red line (writing connections) could go above the green line (active connections)? Isn't the "active connections" the sum of Reading + Writing + Waiting ?...
3
votes
0answers
718 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 ...
3
votes
0answers
263 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 ...
3
votes
0answers
668 views

Nginx - 400 Request Header Or Cookie Too Large (Angular + Symfony)

I have two projects on the same server: a Symfony 3 API (api.example.com) an Angular 5 webapp that uses the API mentionned above (www.example.com) Both are on the same server, served with one Nginx ...
3
votes
0answers
442 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 ...
3
votes
0answers
542 views

why does nginx need to be restarted?

Ubuntu 16.04 starts nginx on boot. It's configured to proxy several dev websites on localhost. These sites are not running when nginx starts the first time. If I start the websites and browse to ...
3
votes
0answers
322 views

How to have frontend, on s3, and backend on another server with the same domain

I have the frontend part of an application on Amazon S3 and the backend on cloud66, with NGinx. The DNS have 'www.website.com' pointing on S3 and 'api.website.com' pointing on nginx. I want to use the ...
3
votes
0answers
135 views

How to harden nginx vhosts (hosting WordPress) from other users in hacked WP installs

Overview: I have a dozen or so WP installs hosted on an Ubuntu 14.04 LTS, w/ PHP 5.5.9 & Nginx 1.4.6. MySQL runs on alternate node, not on public network. Goal: To have directories & files ...
3
votes
0answers
2k views

NGINX: Send a copy of requests to another upstream

Our team has developed an analytic app which records and analyses all incoming (not dropped) requests. To that extent, I have to send a copy of all requests to another upstream in my reverse-proxy ...
3
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 ...
3
votes
0answers
643 views

Server CPU at 100 Percent and not responding using PUMA and Nginx

My Server CPU is at 100 percent and not responding using PUMA and Nginx after one or two days. I use 4 workers. Up to now I had a look at the problem with strace, which leads to the following Output ...
3
votes
0answers
409 views

Nginx - SSL forward secrecy and iOS9 support

I'm trying to bring a couple of Linux web servers into line with the current recommendations for SSL - in particular for allowing iOS9 to connect. One server is CentOS 7, the other CentOS 6.4. I have ...