Questions tagged [nginx-config]

2020 questions
3
votes
1 answer

Allow php value to only work in a subdirectory

In my php.ini, I have disabled allow_url_fopen. I would like to enable it for my /example directory as shown below, but it does not work. However, if I move the directive to allow it from /example to the ~.php$ location above it, then it works fine.…
dstach
  • 119
  • 1
  • 2
  • 8
3
votes
1 answer

nginx: how to get a server for the case of no Host: header?

I've got a special server {} block for the case of people who use an IP address in a host header (server_name ~^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+;) and that works fine. I'd like a different server block for one when no host header at all is provided.…
Cupcake Protocol
  • 661
  • 3
  • 10
3
votes
0 answers

How to print request_body and response_body from NGINX

I want to print the request_body and response_body from NGINX. I try to implement a few of the solution that I have learned from here But it was not working in my case. Is there some additional changes that I need to configure in my NGINX.conf…
2
votes
2 answers

nginx: Regex match the middle of a URL and also the ending?

I have an app on a domain that is set by a developer to proxy at certain URLs: example.com/browser/123foo0/stuff.js for example, where 123foo0 is some random key. The key may also change length in future. That's all fine. But I'd like to interrupt…
nooblag
  • 678
  • 3
  • 23
2
votes
1 answer

Connection reset by peer upstream client node.js application

We have a node.js application that runs completely fine on our local system without giving 502 bad gateway. when deployed on the aks cluster which has nginx ingress controller it gives 502 bad gateway on the client end and in logs it shows…
Taqi Rizvi
  • 101
  • 9
2
votes
0 answers

Nginx Rewrite Querystring to Path with file

I am creating a rule for S3, with Rewrite Querystring to Path with file Requests from the browser to the server can be http://localhost:8088/bucket-media/1111111_0.jpg?size=large "size" is a directory in the s3 bucket, it needs to be proxied to…
s2nner
  • 23
  • 1
  • 3
2
votes
0 answers

nginx authelia-authrequest.conf for subnet

I'm posting this topic because I have a problem with nginx configuration on authelia with ip filtering. Here is my current configuration. ####BABBYBUDDY#### map $remote_addr $is_allowed { 192.168.1.120 1; default 0; …
2
votes
1 answer

Nginx — is it possible to allow access from certain subnets only combining with set_real_ip_from?

I need to deny access to site for all, except number of subnets, where the frontend proxies are located. At the same time I need to set real IP for further processing. The diagram looks something like this: Some infrastructure…
theKorzh
  • 78
  • 7
2
votes
1 answer

Install Nginx on ubuntu 22.04.1 from source and then use package manager

I'm using Nginx repository to make and make install Nginx from source on server. But in some articles they ran apt install nginx at least! My steps: wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ tar xzf…
rfatolahzade
  • 103
  • 9
2
votes
0 answers

nginx: worker process is shutting down

What would be the reason for this nginx process not being killed for many days, I guess this is causing a lot of memory usage. Note: I am using nginx and nginx tcp load balancing.
2
votes
1 answer

nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored

I have three nginx server blocks and when i run nginx -t get error "nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored" I have three nginx server blocks: One: /etc/nginx/sites-available/default server { listen 80…
James Son
  • 93
  • 1
  • 6
2
votes
0 answers

Nginx Config load content through client proxy server

A user currently on their home network, 162.82.216.32, is trying to load our content through their proxy server, 192.231.231.16. When they load the site through their home network is displayed. Can anyone please advise if the above setup should…
2
votes
0 answers

Return "Error: connect ETIMEDOUT" when calling nodejs api with nginx

I have setup node api project in ec2. AWS architecture is something looks like as shown below Api.com > route53 > application load balancer > nginx > node application serve through pm2. Test case and issue I am facing: When I call api with…
2
votes
0 answers

Nginx works with IP address but not domain

I'm trying to configure an nginx server with TLS. It successfully works when I use the IP address, but not with the domain name. For instance, https://111.111.111.111/ works, but https://example.com does not (IP and domain are redacted). DNS address…
Nick
  • 5,108
  • 2
  • 25
  • 58
2
votes
1 answer

NGINX Only path equals to without trailing slash and starts with path with trailing slash

I'm encountering an annoying error when it comes to my current NGINX app configuration. I have a static web app which I am indexing on the path /admin/*. I want the index to be available on /admin, with and without a trailing slash, as well as…
Max
  • 128
  • 5