Questions tagged [nginx]

Nginx is a web and proxy server. Note that questions on the use and configuration of server software may be off-topic and subject to closure if they do not directly involve a programming context. Other Stack Exchange sites such as Super User, Server Fault, or Webmasters may be more appropriate places to ask such questions.

Nginx ("engine x") is a lightweight and high-performance HTTP , and , released under a BSD-like license.

From the nginx wiki:

Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Igor Sysoev started development of Nginx in 2002, with the first public release in 2004. Nginx now hosts nearly 12.18% (22.2M) of active sites across all domains. Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.

Resources:

Useful Links

Talks

Tengine

54687 questions
11
votes
4 answers

disable request buffering in nginx

It seems that nginx buffers requests before passing it to the updstream server,while it is OK for most cases for me it is very bad :) My case is like this: I have nginx as a frontend server to proxy 3 different servers: apache with a typical php…
Uriel Katz
  • 187
  • 1
  • 2
  • 10
11
votes
2 answers

How to redirect HTTP to HTTPS with Nginx Ingress Controller, AWS NLB and TLS certificate managed by AWS Certificate Manager?

I've tried the following to get HTTP to redirect to HTTPS. I'm not sure where I'm going wrong. ingress-nginx object: apiVersion: v1 kind: Service metadata: name: ingress-nginx namespace: ingress-nginx labels: app.kubernetes.io/name:…
jamesrogers93
  • 335
  • 1
  • 5
  • 15
11
votes
3 answers

Kubernetes Ingress Whitelist IP for path

I know I can whitelist IPs for the entire ingress object, but is there a way to whitelist IPs for individual paths? For example, if I only want to allow /admin to be accessed from 10.0.0.0/16? ingress.yml: --- apiVersion: extensions/v1beta1 kind:…
cclloyd
  • 8,171
  • 16
  • 57
  • 104
11
votes
7 answers

file_get_contents getting wrong results

Update I solved the problem and posted an answer. However, my solution isn't 100% ideal. I would much rather only remove the symlink from the cache with clearstatcache(true, $target) or clearstatcache(true, $link) but that doesn't work. I would also…
Dan Bray
  • 7,242
  • 3
  • 52
  • 70
11
votes
0 answers

Gunicorn or uwsgi both ~30x slower than Django WSGI server

I have a Django app. It uses Nginx, sits on an EC2 instance, and uses an AWS load balancer in front of that. Nginx serves static files right from disk as well as using proxy_pass for everything else to route to the WSGI app server. It is the…
Brad Solomon
  • 38,521
  • 31
  • 149
  • 235
11
votes
4 answers

Ruby, Unicorn, and environment variables

While playing with Heroku, I found their approach of using environment variables for server-local configuration brilliant. Now, while setting up an application server of my own, I find myself wondering how hard that would be to replicate. I'm…
mkaito
  • 111
  • 1
  • 3
11
votes
1 answer

What do I need to change in NGINX official Docker's image to have the set-misc-nginx module?

I need to use the random number generator from this library, but I wanted to use the official nginx image, so I was trying to see its source code and perform the changes required to have this library installed. But I am at loss, as the instructions…
PedroD
  • 5,670
  • 12
  • 46
  • 84
11
votes
3 answers

How to run two commands on Dockerfile?

I have to execute two commands on the docker file, but both these commands are attached to the terminal and block the execution from the next. dockerfile: FROM sinet/nginx-node:latest RUN mkdir /usr/src/app WORKDIR /usr/src/app RUN git clone…
Paulo
  • 577
  • 3
  • 8
  • 23
11
votes
2 answers

What are the differences between http and socket inside of ini file in uWSGI?

I'm learning nginx and uwsgi to deploy my Django web app. While learning them, I got confused with "socket" and "http". I think I should write .ini like the following. when I use only uwsgi ... http=127.0.0.1:8001 ... when I use uwsgi and nginx and…
Jinsu
  • 530
  • 6
  • 14
11
votes
7 answers

nginx : rewrite rule to remove /index.html from the $request_uri

I've seen a few ways to rewrite the $request_uri and add the index.html to it when that particular file exists in the file system, like so: if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } but i was wondering if the…
tjmc
  • 148
  • 1
  • 1
  • 6
11
votes
2 answers

How can I match any path containing a dot with nginx?

I am trying to implement a proxy using the nginx configuration The idea is to have a http server hosting my website (my SPA). and having one route on my http server pointing to another api. this is my nginw configuration file…
netlyonel
  • 155
  • 1
  • 2
  • 8
11
votes
1 answer

Certbot MisconfigurationError: nginx restart failed

On a setup with Ubuntu 16.04, Certbot 0.28.0, and nginx 1.10.3, I can't use Certbot to renew an existing certificate. When I run sudo certbot renew, it fails and I get these errors: Hook command "nginx -s stop" returned error code 1 Error output…
Josh
  • 2,790
  • 26
  • 30
11
votes
1 answer

Do I really need web-server alongwith API - gateway in microservice architecture

In the current python application I'd like to redesign, I am using gunicorn along-with nginx. Now as we are moving to the cloud, it makes me think: do I really need nginx or rather any other web-server? In our cloud architecture we would be using an…
11
votes
1 answer

Nginx ingress controller vs HAProxy load balancer

What is the difference between Nginx ingress controller and HAProxy load balancer in kubernetes?
yasin lachini
  • 5,188
  • 6
  • 33
  • 56
11
votes
4 answers

How can I check if current web server is NGINX or Apache using bash script?

I have a Laravel project deployed on Ubuntu VM. I have a script that I am working on right now that to know if the current VM deployed using nginx or Apache programmatically. I know I can just check using these ps and grep command I will find that…
code-8
  • 54,650
  • 106
  • 352
  • 604
1 2 3
99
100