Questions tagged [nginx-config]

2020 questions
2
votes
1 answer

Nginx Cache request blocked by CORS policy when Origin is down

My cache is working fine as long as the Origin Server is running. I use "proxy_cache_use_stale" as seen below. Tried it with different Error Codes and with Updating but it won't show the cached files (They are in the cache folder). I also tried the…
Drummer24
  • 21
  • 2
2
votes
0 answers

Exclude API Route From Nginx HTTP Basic Authentication

I'm trying to exclude the API route "https://example.com/api/" from the Nginx HTTP Basic Authentication. Here is my Nginx Conf: server { listen 80; listen [::]:80; server_name example.com; return 302…
romeo
  • 68
  • 1
  • 1
  • 8
2
votes
2 answers

Kubernetes Ingress Whitelist IP for host

How can I whitelist IP addresses for different hosts, but for the same path? example.com - should be without whitelist. All others must be whitelisted. apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: …
2
votes
1 answer

Nginx: How to map the internal Ip addresses and proxy using ngrok without redirecting

I have two device which can be accessed only using internal network. To access it externally i have installed nginx in raspberry device and added a redirect within nginx like location /device1 { return 301 http://192.168.0.1:80 } Similarly…
Harsha
  • 343
  • 1
  • 3
  • 6
2
votes
1 answer

nginx "mail" & "stream" directive is not allowed in site-enabled/

I have a problem when I try to use the stream or mail directive with nginx. I'm using nginx/1.16.1 & Ubuntu 18.04.4 LTS. This is my nginx.conf user www-data; worker_processes auto; pid /run/nginx.pid; include…
Stefan
  • 115
  • 1
  • 15
2
votes
1 answer

nginx server use HTTP/2 protocol version by default?

I have various nginx server and recently I note that by default response these servers responses using the HTTP/2 version of protocol. I don't have configured the http2 parameter in nginx.conf. Is this the right behavior?
Pablo M.
  • 494
  • 7
  • 14
2
votes
0 answers

no "charset_map" between the charsets "utf-8" and "iso-8859-1" while reading response header from upstream

i need really iso-8859-1 (german charset latin-1) for JTL Shop 4 (german produkt, it can't use today UTF-8) in my additional nginx configuration i set up. override_charset on; charset iso-8859-1; than i receive in the proxy_log nginx log, this…
2
votes
0 answers

NGINX always returns {"status":400,"message":"Bad request"} - not able to consume upstream api

Below is my config: am always getting bad request error when trying to consume api response. But it looks like the upstream api not getting recognized in the configs . please help. api_gateway.conf log_format api_main '$remote_addr - $remote_user…
Satscreate
  • 495
  • 12
  • 38
2
votes
1 answer

How can i configure local by flywheel v5.0.7 site.config.hbs file for roots bedrock

I am a windows 10 user i have installed local by flywheel v5.0.7 & i want to configure roots bedrock into the app folder. now how can i change the default configure (nginx > site.conf.hbs) public folder to bedrock/web folder enter image description…
2
votes
1 answer

Spring-boot: Accept any certificate

I have developed an application based on micro-services. I have some troubles integrating 3 of them. The first service is a Spring-boot application which is connected to the second service, in charge of managing user's authentication, which is…
Pueblo2708
  • 41
  • 8
2
votes
1 answer

nginx server block property 'root' for rest api

Hi I've host a NodeJs RESTAPI on AWS EC2. My nginx server block is like this This gives me a warning in the nginx error logs. [warn] 5495#0: server name "/usr/share/nginx/html" has suspicious symbols in /etc/nginx/nginx.conf:42 This is a…
margherita pizza
  • 6,623
  • 23
  • 84
  • 152
2
votes
1 answer

Setting same domain name in a variable not working for multiple location block in nginx

I want to resolve DNS every time when a new request will come, I am trying to resolve DNS dynamically in Nginx by setting DNS in a variable. It is working correctly for the below example. server { location /mypath { resolver 10.0.3.2…
2
votes
1 answer

How can I disable the Last-Modified header for static file on nginx?

Even if I add these options, the response contains Last-Modified header. I'm testing with nginx + tornado. sendfile off; if_modified_since off; expires off; etag off;
bobry
  • 63
  • 1
  • 6
2
votes
1 answer

Static files configuration in AWS not working

I currently have an multi-docker container application (nginx, postgres RDS, Django) running on Elastic BeanStalk and I am able to use it but the static files (CSS files and JS scripts) are not loaded. This is my current configuration: nginx setup…
2
votes
0 answers

Unable to reload Nginx context

I am newbie to Nginx and adding upstream configuration dynamically through a java program, after that I am trying to reload the context and getting the below error. I tried to reload context on command prompt even and getting sane error over there.…