Questions tagged [nginx-config]
2020 questions
0
votes
1 answer
Trying to get env args from openshift config into Dockerfile and then into nginx config using envsubst
So I'm deploying a React app into Openshift that will call a separate API service and I need to determine the proxy_pass in my nginx.conf based on the staging environment- dev or prod. This seems to be a common enough use case but seems to be…

Al Pal
- 275
- 1
- 9
0
votes
2 answers
How to bypass nginx proxy a list of IPS
I have an Nginx config with the redirect to holding pages:
location / {
...
if ($setholdingpage = 'True') {
rewrite (^.*$) /holding-page last;
}
proxy_pass $backend;
}
Also, I have a list of IPs…

fireman777
- 134
- 1
- 15
0
votes
0 answers
why doesn't nginx load balance not work? how fixed it?
the nginx config below the server
28081 always return 502, i config the proxy_next_upstream, but the request does not passed to next node (28082)
nginx version:1.19.3
upstream boot-server {
server 172.17.112.90:28081 weight=9;
server…

seqwait
- 159
- 1
- 7
0
votes
1 answer
Nginx not connecting url to application
This is my nginx site-enabled file.
server {
client_max_body_size 4G;
server_name example.in;
gzip on;
gzip_proxied any;
gzip_vary on;
gzip_types application/javascript application/json text/css text/xml;
…

Pulkit Sharma
- 264
- 1
- 2
- 18
0
votes
1 answer
Nginx 502 redirect to other page
below is my Nginx conf, I want to redirect my URL to another page if /api throws the error code is 502, How can I do it in nginx.
location ~*/api {
rewrite ^/api(.*) $1 break;
proxy_pass http://127.0.0.1:3200;
client_max_body_size…

kirthan shetty
- 491
- 2
- 5
- 10
0
votes
1 answer
Why aren't my creds being passed into my nginx.conf?
My original nginx.conf:
events {}
http {
server {
include credentials.conf;
listen 80;
location / {
proxy_set_header Authorization $credentials;
proxy_pass [website_of_choice];
}
}
}
My…

user8981199
- 27
- 5
0
votes
1 answer
How to hide nginx.conf authorization credentials?
To explain quickly, I have an nginx server running within Docker, acting as a reverse proxy for my Flask web app. A part of my configuration is using proxy_set_header Authorization to pass some credentials into the proxy_pass website.
This all works…

user8981199
- 27
- 5
0
votes
0 answers
nginx audio track for hls module installation
I started to configure a setup with nginx audio track module and I encountered a few problems.
First of all, I started from the official documentation.
I followed the requirements and installed ffmpeg.
As far as I can see, the available libs…

Alexandru Rusu
- 569
- 1
- 5
- 21
0
votes
1 answer
How to drop path in rewrite and proxy pass the args in nginx
Example request - http://localhost/iframe?ip=192.168.0.237
I want to proxy pass the request to the value of IP and remove the path and args after localhost/ .
Ideally the proxy_pass should point to 192.168.0.237 and the URL should be…

Nirmal
- 549
- 1
- 9
- 24
0
votes
1 answer
Nginx config for Contact Form via AWS/Lambda/SES/API Gateway
I have been following this tutorial on how to configure my contact form using AWS Lambda/SES/API Gateway
https://www.freecodecamp.org/news/how-to-receive-emails-via-your-sites-contact-us-form-with-aws-ses-lambda-api-gateway/
I am successfully able…

Ray Y
- 1,261
- 3
- 16
- 24
0
votes
1 answer
virtual servers in nginx and its implications
I am trying to spin off multiple virtual servers for my different needs in nginx.
I understand that virtual servers are to be created for each domain, at the minimum I will have virtual server one for PROD and one for TEST.
Also is it advisable to…

doctemp09
- 79
- 9
0
votes
1 answer
set variable in nginx conf json
I want to set the below header in nginx conf
payload="{\"pathParameters\":{\"additionalProp1\":\"string\",\"additionalProp2\":\"string\",\"additionalProp3\":\"string\"},\"operationId\":\"operation\",\"scope\":\"Apps\"}"
more_set_input_headers…

Divya Vyas
- 323
- 1
- 4
- 16
0
votes
1 answer
How to format NGINX config in browser?
Do we have an open source tool to format an NGINX config file in browser or IDE?
I found this one http://nginxbeautifier.com/. But it redirected me to a scam web page.

Matvii Hodovaniuk
- 513
- 7
- 21
0
votes
1 answer
nginx static file serving confusion with alias and sub path
I want to set path like this:
location /board/1 {
alias /home/front/;
break;
}
location /board/2 {
alias /home/front/;
break;
}
location /board/{ANY_NUMBER 3..} {
alias /home/front/;
…

nkhcode
- 87
- 1
- 8
0
votes
1 answer
How can dynamically create upstream block with Openresty and Lua?
I need to create an upstream block in the default.conf dynamically with Openresty and Lua.
upstream my_gateway{
for server in #SERVERS_ENV:
server xxx.xxx.xxx.xx:yyyy max_fails=3 fail_timeout=30s;
}

Phoenix
- 3,996
- 4
- 29
- 40