nginx-location Questions

2

Any one familiar with nginx? I am trying to enable proxy_protocol in a conditional manner in a stream block ie for certain endpoints I want the proxy protocol header to be added. For others I dont ...
Celestinecelestite asked 7/9, 2021 at 0:10

3

Solved

I'm trying to make my Nginx a bit more dry, as it's acting as a reverse proxy for nearly 20 servers. Here's what I'm trying to do, all the hostnames and stuff are changed/examples: map $http_host ...
Kibitz asked 1/5, 2018 at 18:6

7

Here are my nginx configure files. On the default.conf, the first location is used to access /usr/share/nginx/html directory, it is ok while I access http://47.91.152.99. But when I add up a new...

4

I'd like Django to serve some media files (e.g. user-uploaded files) only for logged-in users. Since my site is quite low-traffic, I think I will keep things simple and do not use django-sendfile t...
Finedraw asked 28/9, 2016 at 10:16

0

I have a Drupal 10 site with one page at the following URL: localhost:9090/my-page. On that page, I have a Drupal block that includes a React app with its own Browser Router. React BrowserRouter co...
Dominance asked 13/9, 2023 at 0:23

5

Solved

How can I have same rule for two locations in NGINX config? I have tried the following server { location /first/location/ | /second/location/ { .. .. } } but nginx reload threw this error: ...
Verse asked 10/2, 2016 at 16:30

4

I need to find a way/setting to allow Nginx to run a .bat file that will create directories and files via a WINDOWS service; my OS is Windows 10. Currently, our windows service fails to create dir...
Popularly asked 22/2, 2016 at 21:6

2

There are many posts out there and StackOverflow answers, but none has helped me solve this problem. I am using Laradock for a Laravel app on a production server. The Laravel version is 7.24.0 on N...
Zygo asked 10/8, 2020 at 22:39

2

Solved

Environment: Nginx 1.14.0 (see dockerfile for more details). To limit the number of concurrent connections for a specific location in a server, one can use two methods - limit_conn (third example ...
Varistor asked 5/9, 2018 at 14:38

2

Solved

My task is to implement microcaching strategy using nginx, that is, cache responses of some POST endpoints for a few seconds. In http section of the nginx.conf I have the following: proxy_cache_p...
Triazine asked 8/5, 2018 at 7:29

2

I am looking at the nginx configuration to set up a docker repository ########################################################### ## this configuration was generated by JFrog Artifactory ## ######...
Substantialize asked 30/9, 2016 at 14:21

4

Below is my config and I'm getting 404 on all routes defined apart from the well-known route and I don't understand why. If I make a request to http://example.tech/connect I get a 404 and if I mak...
Phonetician asked 11/1, 2019 at 17:20

3

Solved

To bypass cache if upstream is up (max-age 1) and use cache if down (proxy_cache_use_stale) I created following config: proxy_cache_path /app/cache/ui levels=1:2 keys_zone=ui:10m max_size=1g inact...

2

Solved

I have an NGINX web server with two domains and it also runs phpMyAdmin. phpMyAdmin is working fine and I access it through the below non-https url: public-ip-address/phpMyAdmin This is how the ...
Beitch asked 13/6, 2020 at 14:9

3

I have an Angular2/Angular app running inside a docker container and using nginx to serve it. So my app base = /myapp/. Everything works correctly when hitting the app using the base url i.e. www.s...
Romeyn asked 27/2, 2017 at 12:28

2

Solved

i'm running latest stable version of Nginx on GNU/Linux OS and having the following virtual host, i'm trying to setup custom localized 404 error pages avoiding if but i always end up in redirect lo...
Maynardmayne asked 13/4, 2017 at 8:46

1

Solved

Goal My goal is to setup multiple backend api container exposed on the same nginx server : http://localhost:80/api/account -> call http://account-service:9000/ http://localhost:80/api/cart -&gt...
Fantasist asked 18/7, 2020 at 12:17

1

I have this situation where a have lots of API´s running on different machines on different ports using Tomcat. I can create the upstream with those IP addresses but how to add the other part of th...
Willock asked 31/3, 2020 at 12:28

1

Solved

Can I create a location which can be accessed by any other location in nginx config and cannot be accessed directly from outside? I can use a deny directive, but it will also deny access to the lo...
Monoplegia asked 31/10, 2018 at 9:8

2

Solved

I want to log the $request_body in the access logs. But some of the requests have some JSON fields that are sensitive like passwords. Example: [2019-03-28] 201 - POST /api/user/add HTTP/1.1 - {...
Stenophagous asked 28/3, 2019 at 11:27

1

Nginx regex location syntaxe Regex expressions can be used with Nginx location block section, this is implemented with the PCRE engine. What does exactly this feature support as it is not fully d...
Mutism asked 21/1, 2020 at 17:22

1

Nginx uses the PCRE engine for evaluating regular expressions, the documentation state that / delimiter is not used so we don’t have to escape the forward slash / in an URI as we may do in a standa...
Urine asked 21/1, 2020 at 14:20

1

I have a location like: location / { set $api_name "Web"; proxy_intercept_errors on; set $upstream upstream_a; if ( $kms_in_cookie != "not_set" ) { set $upstream $kms_in_cookie; } if ( $upstr...
Joh asked 14/8, 2018 at 9:18

2

The problem: when accessing our website with an invalid URL that contains a '%' sign, Nginx throws a 400 Bad Request error. Instead of the Nginx page, we would like to rewrite the request to a (Wo...
Symbolism asked 8/11, 2016 at 6:42

1

Solved

What I want is to forward all requests made for: www.domain.com/api/whaterver/comes/next to -> api.domain.com/whatever/comes/next The reason is to avoid browser CORS for www.domain.com requestin...
Sheers asked 19/10, 2019 at 18:41

© 2022 - 2025 — McMap. All rights reserved.