Questions tagged [nginx-config]

2020 questions
2
votes
1 answer

Purpose of backslash in nginx map configuration

I'm using a map configuration to block IP addresses with nginx + fail2ban The sample configuration genrator code in fail2ban repo looks like this : ... _echo_blck_row = printf '\%%s 1;\n' "" actionban = %(_echo_blck_row)s >>…
user
  • 17,781
  • 20
  • 98
  • 124
2
votes
0 answers

How to limit the max chunk size for chunked_transfer_encoding in nginx?

What I'm trying to do I'm trying to limit the chunk size, as in, the maximum size a response body can have for an nginx v1.19.7. What I tried I found various parameters that do similar things in the nginx docs, among them…
blkpingu
  • 1,556
  • 1
  • 18
  • 41
2
votes
1 answer

How to run laravel websocket on Nginx real server

I run websocket server on local php artisan websocket:serve. My nginx server configration is server { root /var/www/laravel/public; index index.html index.htm index.php; server_name testingdomain.com; location / { …
2
votes
0 answers

Nginx Directory index of "/var/www/html/" is forbidden

I have a PHP application but I cannot get Nginx to work with it. I have checked permissions and my nginx configuration but I am unable to find the issue. /etc/nginx/nginx.conf # For more information on configuration, see: # * Official English…
Rylad
  • 47
  • 1
  • 5
2
votes
2 answers

Nginx How do i route to reverse proxy by location

Currently i'm using nginx server and using nodejs server as reverse proxy. I want to make the nginx server proxy_pass different server by location. So, lets say my domain is subdomain.domain.com. When loading subdomain.domain.com/, this should serve…
parkjbdev
  • 33
  • 2
  • 5
2
votes
2 answers

Nginx Redirection Issues with multiple domains

So I have two domains: example.com example.ca This is a docker container running nginx and I am trying to accomplish http to https redirect and www to non-www redirect. Docker on the host is bound to port 80 and 443. To be clear traffic works to…
Tyler Radlick
  • 184
  • 1
  • 6
  • 12
2
votes
1 answer

Nginx -- Error 400: Origin is not allowed to make this request

I'm setting up a reverse proxy for MeiliSearch with Nginx. When sending a POST request from an origin, I get a 400: Origin is not allowed to make this request error. However, if the request does not have an origin, everything works…
Nick
  • 5,108
  • 2
  • 25
  • 58
2
votes
2 answers

How to set up nginx config for a React.js app deployed on AWS ECS with path-based routing load balancer

I have an application which consists of two containers: a backend node.js server on express.js, referred to as 'app-server' a front-end react.js client based on create-react-app, referred to as 'app-client'. This one uses an nginx server to set up…
kxkaro
  • 41
  • 1
  • 4
2
votes
2 answers

multiple site on localhost served by nginx without domain name

I'm on ubuntu 20.04 rpi4 and I like to write some www site for testing. Is quite simple configure nginx using some server blocks and server_name inside the server blocs to point to some virtual domain not existing and then set this domain to point…
user2053904
2
votes
1 answer

Nginx reverse proxy to frontend and backend

I have two react app running on localhost:3000(frontend) and localhost:3001(backend). I want to serve both backend and front end from same server_name.. For example, if a user hits example.com the Nginx should route the traffic to frontend running…
suyog nepal
  • 53
  • 1
  • 5
2
votes
3 answers

Strapi/Nginx - Strapi routing does not work in production

I created a website which uses a nuxtjs frontend and a strapi backend. After deployment to a VPS, I cannot get the strapi routing to work. I read multiple posts about this on the internet and followed the official documentation about nginx proxying…
kampfkuchen
  • 454
  • 1
  • 4
  • 20
2
votes
2 answers

Angular with Nginx and docker-compose

I'm trying to run with Docker compose an angular app. This is my Dockerfile of Angular container # Stage 0, for downloading project’s npm dependencies, building and compiling the app. FROM node:14.13 as node # set working directory RUN mkdir…
2
votes
1 answer

nginx match request body without using lua module

is there a way in nginx to do something based on if the request body has a string or not? I am sure i can do it with using Lua module.. I am try to find out if there is a way using nginx alone. I am hoping something like below will work. location…
Janier
  • 3,982
  • 9
  • 43
  • 96
2
votes
1 answer

Nginx Whitelist IP, use certificate otherwise

I am setting up a server for my university which has to be only accessible from inside their network. This I can easily do with nginx. Unfortunatley there are some people that do not have access to this network/IP range. I could use Basic…
PythonF
  • 456
  • 1
  • 5
  • 21
2
votes
1 answer

How to redirect from specified path in the ingress file to the root path of the service

I have an ingress defined as follows; apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: webserver-ingress annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/rewrite-target: / …