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
12
votes
5 answers

Wrong IP-Address with nginx + Unicorn + rails

I check the ip-address in the controller with request.env['REMOTE_ADDR'] this works fine in my test environment. But on the production server with nginx + unicorn I always get 127.0.0.1. This is my nginx config for the site: upstream unicorn { …
ThreeFingerMark
  • 989
  • 3
  • 12
  • 21
12
votes
2 answers

Nginx proxy https to http on non standard port?

I have nginx configured to proxy https traffic to an http server running on the same machine. Everything works fine when I configure nginx to listen on / proxy from https port 443. But I really want to listen on a non standard port. When I…
kenen
  • 397
  • 1
  • 3
  • 14
11
votes
1 answer

Serving Large Files Through Nginx via Rails 2.3 Using x-sendfile

Let's say I have a Rails 2.3.2 application fronted by nginx and served by mongrel in which I need to serve a large static file through Rails (to control access to it). I want the Rails app to delegate the transfer of the file to nginx, to avoid…
Rich Apodaca
  • 28,316
  • 16
  • 103
  • 129
11
votes
1 answer

how to avoid nginx to replace %20 by whitespace when using as a proxy (proxy_pass) ?

I am using a nginx as a proxy for an apache server. Here is my config: location ~ ^/subsite/(.*)$ { proxy_pass http://127.0.0.1/subsite/$1?$query_string; } the problem is that if I send a request with %20 like…
TomPAP
  • 249
  • 4
  • 12
11
votes
11 answers

Match the path of a URL, minus the filename extension

What would be the best regular expression for this scenario? Given this URL: http://php.net/manual/en/function.preg-match.php How should I go about selecting everything between (but not including) http://php.net and…
silkAdmin
  • 4,640
  • 10
  • 52
  • 83
11
votes
2 answers

which server side language nginx webserver supports

which server side language nginx webserver do support? For example apachi-tomcat is for java, wammp is for php. and secondly it is installed on my pc i need to know that how can i access it via http and in which do i need to put my applications
Ali Raza
  • 1,215
  • 3
  • 15
  • 26
11
votes
4 answers

Nginx does not re-resolve DNS names in Docker

I am running nginx as part of the docker-compose template. In nginx config I am referring to other services by their docker hostnames (e.g. backend, ui). That works fine until I do that trick: docker stop backend docker stop ui docker start…
11
votes
3 answers

cant create a second ingress controller using helm with custom class in Azure k8s cluster

I have created an ingress controller using Helm with default configuration default nginx-ingress-controller LoadBalancer 10.0.182.128 xx.xxx.xx.90 80:32485/TCP,443:31756/TCP 62m default nginx-ingress-default-backend …
ikenahim
  • 331
  • 1
  • 3
  • 15
11
votes
1 answer

kubernetes k3s agent can't connect to master CA/SSL error

I am trying to deploy an application with k3s kubernetes. Currently I have two master nodes behind a load-balancer, and I have some issues connecting worker nodes to them. All nodes and the load-balancer runs in seperate vms. The load balancer is a…
Jonas Grønbek
  • 1,709
  • 2
  • 22
  • 49
11
votes
5 answers

Using CSP in NextJS, nginx and Material-ui(SSR)

TLDR: I'm having trouble with setting up CSP for NextJS using Material-UI (server side rendering) and served by Nginx (using reverse proxy). Currently I have issues with loading Material-UI stylesheet, and loading my own styles using makeStyles from…
Clumsy-Coder
  • 542
  • 1
  • 7
  • 20
11
votes
1 answer

Nginx serving static content and proxy to apache

Is there a configuration I can use with nginx that would serve all static content for all wbsites on port 80 and all dynamic content would be forwarded to apache on port 8080? Preferably I would like to not have to change anything in apache vhosts…
DavidW
  • 5,069
  • 14
  • 46
  • 68
11
votes
1 answer

How to use Porkbun SSL Certificate Files with Nginx?

I'm trying to figure out how to use the Porkbun Let's Encrypt Files with Nginx. They have generated a zip file with the following files for me to use domain.cert.pem, intermediate.cert.pem, private.key.pem, public.key.pem From this site…
fujinman
  • 115
  • 1
  • 8
11
votes
1 answer

Self-contained Docker image with Laravel app (no shared volume)

There are at least a dozen tutorials on the web about how to set up a Laravel app with Docker. The basic set up they all use is 3 Docker containers: nginx container php-fpm container mysql container The Nginx and PHP-fpm containers rely on a…
Bintz
  • 784
  • 2
  • 9
  • 22
11
votes
3 answers

Chrome net::ERR_HTTP2_PROTOCOL_ERROR 200 after a reconnect

I'm using Node server with an express app which handles a Server Sent Events stream. This is proxied via NginX with http2 enabled. The SSE events are consumed via EventSource in a React app. I'm sending a heartbeat message every 10 seconds to keep…
fabrice
  • 178
  • 1
  • 1
  • 8
11
votes
2 answers

Using CherryPy/Cherryd to launch multiple Flask instances

Per suggestions on SO/SF and other sites, I am using CherryPy as the WSGI server to launch multiple instances of a Python web server I built with Flask. Each instance runs on its own port and sits behind Nginx. I should note that the below does…
Tom Merrihew
  • 433
  • 4
  • 10