Questions tagged [nginx-config]
2020 questions
2
votes
1 answer
Nginx proxy_pass with variables
I've got 2 upstreams and described the logic of cookie check in nginx config:
upstream back {
server backend-release.mynamespace.svc.cluster.local;
}
upstream back-preprod {
server backend-preprod.mynamespace.svc.cluster.local;
}
map…

Andy
- 31
- 2
2
votes
0 answers
javascript module in with nginx
I'm setting a webserver on my local machine using nginx, but I'm not able to run javascript. When I try to import a javascript file as a module, I run into "Failed to load module script: Expected a JavaScript module script but the server responded…

user3195869
- 75
- 1
- 6
2
votes
0 answers
nginx: [emerg] "stream" directive is not allowed here
i'm try to setup load balancer with nginx to keep Client IP at backends node by create file /etc/nginx/sites-available/test.conf and symlink for it
stream {
upstream backend_servers {
server http://server1.com;
server…

manhkhoa168
- 151
- 1
- 4
- 8
2
votes
1 answer
NGINX why does my redirection from subfolder to ip address not work?
I have following network situation:
Router 192.168.1.1 (portforwarding 80 to 192.168.1.20 Raspberry)
Raspberry 192.168.1.20 with nginx running.
Synology NAS 192.168.1.10 with "synology drive" service running.
On the Raspberry 192.168.1.20 nginx conf…

Miracuru
- 65
- 6
2
votes
0 answers
Nginx auth_basic text not showing in login window
According to this example, whatever text follows auth_basic should show in the login window. But it does show not for me. Instead, I get a plain window:
Here's my nginx location block:
location /dash/ {
auth_basic "Cool system admin";
…

tash
- 711
- 5
- 13
2
votes
0 answers
Get Nginx config variable value from PHP
In my Nginx server block I have:
server {
client_max_body_size 8M;
...
Is there a chance I can read this value safely from the level of PHP script without parsing the file?

Sfisioza
- 3,830
- 6
- 42
- 57
2
votes
1 answer
How to apply Nginx Ingress rate limiting?
I am trying to implement rate limiting feature to my AKS using nginx ingress rate limiting. I have just provided limit-rps:10 in nginx ingress resource. Still, i dont see expected behavior which is rps * default burst rate. Could somebody help on…

guru
- 97
- 1
- 8
2
votes
1 answer
NGINX try_files can not find the "$1" in directory
I am hitting a problem with NGINX try_files and $1
I want NGINX to serve a file if it is already in a folder. If it is not in a folder, then the request should be sent to Django.
Here is the file in NGINX:
ls /app/processed/instagramwhite.svg…

np3228
- 85
- 6
2
votes
1 answer
Serve PDF file by location & query parameter
How can I serve a PDF file at the below address:
127.0.0.1/getMeThatFile/willYou?name=jane
which is stored at a location:
/usr/share/nginx/thatFile.pdf
I tried to follow Serve pdf file by location in nginx, but couldn't get it to work:
server {
…

Pushp Vashisht
- 874
- 3
- 9
- 17
2
votes
1 answer
How to correctly deploy/setup NestJS backend using Nginx?
I'm trying to deploy my webapplication using Angular and NestJs using Nginx on an Ubuntu remote server.
I got the frontend working on https://ikse.fransenit.nl/products but cannot get the backend to work. It was working fine locally. When I try to…

Jessey Fransen
- 135
- 2
- 11
2
votes
1 answer
Nginx connectivity with vultr loadbalancer
We had many applications on single vultr cloud instance, but it has only one default healthcheck for a single https loadBalancer with SSL certificate.
so we used nginx to configure mutliple /backend URL with http specified and running using…

klee
- 1,554
- 2
- 19
- 31
2
votes
0 answers
Rewrite a header to a request string in nginx
I am trying to rewrite the nginx x-auth-request-email header to a request string using the ingress controller annotation like this:
nginx.ingress.kubernetes.io/configuration-snippet: |
set $args user=$http_x_auth_request_email&$args;
Which…

user3124206
- 375
- 1
- 7
- 16
2
votes
1 answer
Can't forward images to webp with Nginx using Laravel
I'm trying to forward all jpeg and png images to webp. It's a Laravel project. Most of images in /storage folder as a symlink in public folder. I followed guides and I know a bit regex but I couldn't find any clue what's wrong.
I have webp images in…

oguz463
- 63
- 6
2
votes
1 answer
How to properly debug sentry and find cause for 502 nginx error
I'm new to sentry and Nginx, I'm having a lot of trouble finding out what is happening in my instance, and why I'm getting 502 from Nginx.
Where I can find the root of the problem? I try using tail -100 /var/log/nginx/error.log but I don't see where…

Caio César P. Ricciuti
- 415
- 6
- 18
2
votes
1 answer
Dynamic proxy_pass according request header in Nginx
Here is part of my nginx.conf:
location ^~ /api/ {
#resolver kube-dns.kube-system.svc.cluster.local valid=5s; #don't work
resolver 10.244.64.10;
set $loadurl http://gateway-service.default.svc.cluster.local:55558/;
…

Daiql
- 84
- 9