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.

0
votes
0answers
9 views

Pagespeed caching logged pages

Currently I am using the following combination: Nginx with the Pagespeed module for static pages and the fastcgi_cache for dynamic page caching ... But I get the feeling that pagespeed is generating ...
1
vote
1answer
30 views

rsyslog: parse nginx access log and send it via omhttp to backend

I need to read nginx access_log file and send data to http backend when line contents 'some expression'. It is a part of task to billing downloaded files via nginx access_log. Nginx stores log to /...
0
votes
1answer
41 views

Linux Ubuntu disk usage

Currently, I have a streaming dedicated server, below you will be able to see server details: HDD: 12TB HDD RAM: 64GB Processor: Intel® Core™ i7-6700 Quad-Core Skylake Hyper-Threading Network speed: ...
0
votes
1answer
80 views

Nginx + Passenger: Cache 404 urls

Context I have a Rails app with a nginx server and Passenger. The app is dynamically generating pages based from the request url: if the url exists in the database the app renders the corresponding ...
0
votes
0answers
22 views

Strictly syntactic config correctness check?

I am aware of nginx -t. This however isn't a strictly syntactic check for missing semicolons etc. - it actually tries to interpret the configuration and validate certain values, e.g. it tries to ...
0
votes
0answers
28 views

Default root for server but different for location

I'm trying to have a default root location for the server block as in server { root /foo/html index index.html } so that all requests by default are going to be served from /var/nginx/html ,except ...
0
votes
0answers
20 views

Why is Nginx's default lingering_time so high (30 seconds)?

I am using Nginx as a reverse proxy. When sending it an infinite amount of garbage, and the back-end application already responded to the request (for example with some error), Nginx will patiently ...
1
vote
1answer
71 views

nginx no longer able to proxy a website that's behind Cloudflare DDOS protection

I have a server set up with nginx that's intended to transparently reverse-proxy a specific website that is not owned by me. Recently that website started using Cloudflare DDOS protection and I'm no ...
0
votes
0answers
27 views

NGinx does not add CORS-headers, despite being explicitly added

Our server runs an API, which should be accessible for everyone. This API runs behind nginx. All my attempts to add CORS-Headers have been futile up till now - the requests are served but without the ...
1
vote
1answer
19 views

how does return and rewrite works?

location /movies { return 301 nice.com } location /foo { rewrite /foo/(.*) /$1; } I am accessing http://localhost/foo/movies. What happens is url gets changed to http://localhost/foo/nice.com. I ...
0
votes
0answers
19 views

Access issue in (Angular Java) Web Application

We are facing a strange issue in our web application (Angular + Java). Some times the application stops working on Countries other than India. Though Angular page gets loaded but it is not able to ...
0
votes
0answers
26 views

Zimbra mail server “not able to send mail internally” with in same domain

Please help me to send and receive mail internally through zimbra mail server. For your reference i have attached some logs- Apr 12 17:13:57 mail postfix/dkimmilter/smtpd[25091]: timeout after END-...
-2
votes
1answer
73 views

nginx: [emerg] bind() to ip:3000 failed (99: Cannot assign requested address) [closed]

I want running my server(nodejs) without server name. Only running on my ip address. Here is my config file: /etc/nginx/sites-available/server.com.conf server { listen xx.xx.xx.xx:3000 ...
0
votes
1answer
95 views

nginx: [emerg] unknown “request_url” variable

I am running a Wordpress site on Google Compute Engine. It's Nginx and used to work correctly. After a server restart it no longer starts up Nginx. I receive : nginx: [emerg] unknown "request_url" ...
0
votes
0answers
43 views

Nginx returning 404 on any path except / (proxy_pass)

I am using nginx as a reverse proxy to serve my various node and react applications. Basically I set a subdomain for each application. I can query https://demo.myapp.com/ and it gets passed to the ...
0
votes
0answers
410 views

Load balancing between multiple servers in nginx but with specific IP requirements

I am trying to load balance between multiple backend servers which should be something relatively simple using upstream. That said, I have some specific IP requirements that I'm not sure how to handle....
0
votes
0answers
62 views

nginx ignores client request buffer size configuration

We're running nginx (version 1.15.8) via Kubernetes Ingress and we see a lot of warnings such as *9882 a client request body is buffered to a temporary file /tmp/client-body/0000000001 It seems very ...
0
votes
0answers
56 views

nginx if in location block - [emerg] unknown “1” variable

I'm trying to do a redirect in nginx, based on an if condition. I have some wrong URLs (doubled folder in URL) indexed by Google and I'm trying to do a redirect to the correct URL. example.com/abc/...
1
vote
1answer
26 views

Looking for nginx rules to differentiate if a subfolder is listed or not

For example, if there is any subdirectory listed, keep the subdirectory. But if it's just the URL listed, then forward the user to localhost:3333/publiclink location /.(az)$ { proxy_pass http:...
1
vote
2answers
25 views

Using nginx reverse proxy, should I install my ssl cert in Nginx or my other services?

my current setup is a Ubuntu server (18.04) and I've installed Nginx (1.14.2) and configured it as a reverse-proxy for my local Expressjs service (4.15.4) & future projects. When using Nginx as a ...
0
votes
1answer
49 views

Running Code server on subdomain with nginx reverse-proxy

I have a flask web server running on an ubuntu server on port 8000, with an nginx reverse proxy to port 80. I also want to run a code-server from code.com on a subdomain (code.example.com) at the same ...
1
vote
1answer
35 views

niginx configuration simpification of location directives

I have the following (redacted for simplicity) nginx config: server{ location ~ /saml/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; ...
1
vote
0answers
30 views

Nginx does not send SERVER CERTIFICATE after SERVER HELLO

I have an NGINX site that randomly produces connection failures during the TLS handshake. I investigated the issue using curl --trace and found that every other request times out because the server ...
0
votes
1answer
47 views

“Bad Gateway” when connecting to old IIS servers over SSL through NGINX reverse proxy

I am trying to set up an NGINX server as a reverse proxy to make it possible to connect via TLS 1.2 to an old IIS server that is limited to TLS 1.0 Connection on port 80 works fine. But I get 502 ...
1
vote
1answer
240 views

Nginx timeout for websocket

I'm connecting a client with websocket through Nginx (as a reverse proxy) to an asp.net core application. Between server and client there are heartbeat commands to keep websocket connection open. My ...
0
votes
0answers
29 views

Apache httpd version of Nginx stream directive

Nginx has a stream directive that allows Nginx to serve as a reverse proxy to an application server without terminating the SSL connection. Does Apache httpd have similar functionality? At present, ...
0
votes
0answers
24 views

NGINX block all but selected IPS from admin directory not working [duplicate]

location ~ /admin { allow 84.12.47.127; allow 85.124.51.226; deny all; error_page 403 https://website.com/; } I have the above block in my nginx.conf file it seems to redirect any ...
0
votes
0answers
47 views

How do I redirect this reverse proxy to not have trailing slash

I have a website that connects to my blog using a reverse proxy to make the URL look like this https://example.com/blog. The blog is hosted on WordPress through WPEngine. The website is on an Nginx ...
0
votes
0answers
55 views

docker-compose, nginx, gunicorn and SSL

I'm trying to set up a django project using SSL. I got it working without SSL but I'm clearly doing something wrong since https:// doesn't work and http:// just redirects to the main nginx site. Here'...
0
votes
0answers
54 views

Kubernetes Nginx Ingress Controllers log to Stackdriver

I'm using Nginx Ingress Controller on GKE and I want to send its logs to Stackdriver with the following format https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#HttpRequest. At the ...
0
votes
0answers
97 views

Keycloak with nginx reverse proxy not loading resources

I'm trying to add nginx reverse proxy to keycloak client. I have this nginx configuration: server { listen 80; listen [::]:80; server_name service.example.es; location / { ...
1
vote
0answers
13 views

Remove last directory in nginx proxy url

How i can rewrite proxy url in nginx? Example: example.com/s/imageName/someString.png to localhost:2228/foo/bar/imageName.png Naturally using nginx proxy
0
votes
2answers
26 views

Stop nginx before APT upgrades run

How can I stop nginx before APT upgrades run in Ubuntu? We run unattended upgrades on the server and in case there is any upgrade that will interfere with nginx I would like to stop the nginx service ...
0
votes
0answers
31 views

NGINX - Dynamic throttling of bandwidth

I am going to deploy a website with several big media files (~10 GiB) and I would like to balance the load on it. NGINX will be used to serve the files. What I would like to achieve is something that ...
0
votes
1answer
41 views

How I can create dynamic root path in NGINX config?

During my deployment, I create artifacts, which are folders with static files - html, css, js. And they are copied to the server in the folder /usr/share/nginx/html/${SHORT_COMMIT_HASH}. The site, ...
0
votes
0answers
43 views

Nginx reverse proxy setup redirects only first URI not the relative paths in links

I am unable to load a website on my local server running in a container using nginx's reverse proxy. My setup is: Client:http://example.com/app1 => nginx_reverse_proxy:192.168.1.1 => http://192.168.1....
0
votes
0answers
21 views

Nginx round robin after N requests — server weights, other solutions?

Suppose I have 4 servers and I'd like to send the first 10 requests to the first one, and then send the next ten requests to the second, and so on. Unweighted round robin would send one request to the ...
0
votes
1answer
54 views

Why so much maxrequestworkers suggestion by apachebuddy?

I am using a Ubuntu 18.04 server for hosting a big WordPress site, this site gets max 2500 visitor per day. My issue is my site going down every few minutes and showing 504 Gateway Time-out error. I ...
2
votes
1answer
109 views

nginx 1.15.10 - TLSv1.3 doesn't get applied despite the config

nginx -V nginx version: nginx/1.15.10 built by gcc 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) built with OpenSSL 1.1.0j 20 Nov 2018 (running with OpenSSL 1.1.1b 26 Feb 2019) TLS SNI support enabled ...
2
votes
1answer
92 views

Nginx redirect wildcard subdomain with www prefix to non-www wildcard subdomain

If you're serving an application at *.example.tld, how would you set it up so that http and https traffic for www.*.example.tld gets redirected correctly to *.example.tld? Current nginx config looks ...
0
votes
1answer
52 views

NGINX Serve static files inside a nested location

I have a nested location directive, I want to serve the app at the /api and the static files in the /api/static/ For serving static files I'm using try_files $uri /dev/null =404 inside a nested ...
0
votes
0answers
53 views

Load balance UDP and TCP traffic to different servers based on source

We have a use case where we need to have a load-balancer that can handle both TCP and UDP traffic for multiple backends. We want to route traffic based on the source network. For example like this: ...
1
vote
0answers
24 views

Protect folder and all files/subdirectories with htpasswd in nginx [duplicate]

This is so weird - I am trying to password protect a folder in nginx, and it's sorta working... here is my config block: location /private/ { auth_basic "Restricted"; ...
2
votes
1answer
152 views

Multi-client architecture AWS EC Nginx rtmp server setup with raspberry pi camera as client for live video streaming

Our Approach Set up ngnix rtmp webserver on AWS EC ubuntu 16.04. Successfully completed single client(RPi Camera) streaming. Now we want to send multiple Pi Cameras live Feed on this server which ...
0
votes
0answers
84 views

How to fix “mbind: Operation not permitted” in mysql error log

I have a problem with my MySQL error log which currently mostly consists of "mbind: Operation not permitted" lines (see below). Why does it happen and how do I fix it? It's the "mostly" part that ...
0
votes
1answer
160 views

NGINX: Ignoring Certain URL Parameters for Cache Purposes

So say my NGINX cache key looks like this: uwsgi_cache_key $scheme$host$request_method$request_uri; ... and that's mostly what I want. I want NGINX to make a cache key based on the entire URL, ...
0
votes
0answers
29 views

Nginx reverse proxy domain root location redirects back to server IP

I have a client with an existing domain name which cannot be pointed to my server just yet. So in the meanwhile I've added my node app and configuring the reverse proxy. This is what I've done: 1) ...
-1
votes
1answer
44 views

PHP move_uploaded_file fail

This is a common question but I double checked suggested solutions without success. These are the errors from PHP: Warning: move_uploaded_file(images/img01.jpg): failed to open stream: Permission ...
0
votes
0answers
21 views

configure nginx for PHP in subfolder

I wish to serve an old app that lives in a folder - the folder contains everything needed - index.html, various .js and a "server.php" backend. index.html works fine, but I get 404 for the calls to ...
0
votes
1answer
494 views

nginx reuseport with backlog

In nginx if I specify reuseport and backlog=X stream { server { listen 8080 backlog=X reuseport; will I get a maximum queue length of size X per socket/worker or a max total queue of size X?