Questions tagged [openresty]
26 questions
3
votes
2 answers
NGINX - OpenResty - How to reverse proxy a call to 2 different servers based based on a string?
I'm trying to configure NGINX/OpenResty to proxy SOAP calls to 2 different servers based on a string present on the SOAP request.
What I'm able to do:
I am able to proxy requests to 2 different servers based on the path the SOAP client is…
![](../../users/profiles/502293.webp)
jedelvalle
- 31
- 1
- 2
2
votes
1 answer
Rewriting client "Host" http header before nginx validates the field
I get following request from a device and should proxy it to hd10.vtech.com:
GET http://hd10.vtech.com/test/pp_firmware/HD10-CH010_SUOTA.bin HTTP/1.1
Host: http://hd10.vtech.com/test/pp_firmware/HD10-CH010_SUOTA.bin
Range:…
![](../../users/profiles/487705.webp)
gspoosi
- 131
- 4
2
votes
1 answer
Nginx Proxy to AWS ELB not passing HTTPS protocol to Backend Instances
This is my first ever question, so please go easy on me!
I'm trying to set up an Nginx proxy server to auto-generate SSL certificates using OpenResty/Lua and LetsEncrypt, within a multi-tenant SAAS platform.
The proxy server is running and…
![](../../users/profiles/219857.webp)
bryanus
- 131
- 1
- 4
2
votes
2 answers
Deleting key in Nginx cache and Backend database in the same request
I am using the open source Nginx as the web server with Proxy_cache.
I have a unique usecase of deleting the key in cache as well as pass the request to the backend servers to delete the key in DB without caching the response.
So delete key in Web…
![](../../users/profiles/463884.webp)
dv3
- 31
- 4
2
votes
1 answer
Nginx: Change value of `ssl_verify_client` based on request IP
When setting up nginx with client-certificate config, ssl_verify_client should be set to on or optional. If we want to bypass verification for local users (like 192.168.0.0/24), we can use optional value. But this way, nginx still requests a…
![](../../users/profiles/105928.webp)
Taha Jahangir
- 2,012
- 1
- 15
- 16
1
vote
1 answer
OpenResty with Docker Compose cannot resolve own name (hostname.domainname) in Lua block
I have a docker image containing an OpenResty server. I am running it within a docker-compose file like this:
version: '2.1'
services:
dev.example.com:
# etc.
If I set the resolver to use the Docker one in the OpenResty configuration, then I…
![](../../users/profiles/240915.webp)
Tom Fenech
- 190
- 8
1
vote
1 answer
Log rotation in nginx
I've found an example of doing log rotation in Nginx here
But a simple test with:
set $date "2018-08-24";
access_log /home/tim/log/access-http-$date.log default;
produces a log file named access-http-.log. I'm using nginx 1.13.6 (with…
![](../../users/profiles/15245.webp)
timbo
- 209
- 1
- 4
- 12
1
vote
0 answers
How to correctly set permissions on a folder so nginx can read from the directory and files
I am referencing my SSL files that are stored under:
/etc/letsecrypt/live/www.example.com/fullchain.pem
/etc/letsecrypt/live/www.example.com/privkey.pem
From within nginx I need to be able to read to those files, I will be using LUA code to read…
![](../../users/profiles/307806.webp)
cool breeze
- 101
- 8
1
vote
1 answer
How to install OpenResty on Amazon Linux
I'm trying to install OpenResty on Amazon Linux but not having much luck.
I've followed the instructions on the website for installation using yum here: https://openresty.org/en/linux-packages.html
but am getting the following…
![](../../users/profiles/375417.webp)
Willem van Ketwich
- 131
- 4
1
vote
1 answer
openresty nginx http call to backend server along with proxy_pass
my nginx.conf file :
location /XYZ/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header User-Agent…
![](../../users/profiles/465238.webp)
avinash
- 11
- 1
1
vote
1 answer
Nginx - proxy_pass to another internal location block
I am using Nginx to cache some responses. The backend that generates these responses, sets a common Cache-control header for all the responses. However, I need to cache some of the responses for a longer duration than the others. That is I need to…
![](../../users/profiles/521148.webp)
bytesandcaffeine
- 21
- 1
- 4
1
vote
1 answer
worker_processes value for Nginx/Openresty running on Kubernetes
Based on the documentation here, https://nginx.org/en/docs/ngx_core_module.html#worker_processes
The worker_processes is defined as the number of worker processes.
The optimal value depends on many factors including (but not limited to) the number…
![](../../users/profiles/660334.webp)
Kshitij Joshi
- 21
- 4
0
votes
0 answers
proxy_cache_background_update with a variable?
I am faced with a non-negotiable requirement to set the value of proxy_cache_background_update dynamically.
The proxy_cache_background_update directive doesn't support a variable argument. It can only be literal on or literal off. So simply setting…
![](../../users/profiles/190942.webp)
Szczepan Hołyszewski
- 113
- 6
0
votes
2 answers
Unable to connect to AWS ec2 instance public ip via browser
I've newly installed Openresty as the web server on an ec2 instance and its currently running but I can't even view the welcome page when I try to navigate to it via my public ip address at the browser. Anyone can tell whats the issue I'm having?
So…
![](../../users/profiles/518370.webp)
Joshua
- 3
- 3
0
votes
1 answer
significance of nginx upstream_connect_time logged as an empty value vs hyphen
I've noticed for 499 client timeouts the upstream_connect_time nginx logged is sometimes an empty value, and sometimes a hyphen '-'.
I'm guessing this difference in how this field is logged means something - but I haven't seen this explained in the…
![](../../users/profiles/266048.webp)
Tim
- 103
- 4