Questions tagged [nginx-config]

2020 questions
6
votes
2 answers

How to configure nginx's default.conf

I'm trying to configure default.conf in /etc/nginx/conf.d to show a simple landing page located at /home/ubuntu/project-source/company/entry/index.html. The domains are set up correctly as far as I know to point to the server A: test24.company.io…
Edito
  • 3,030
  • 13
  • 35
  • 67
5
votes
2 answers

Rewrite "https://files.mydomain.com/files" to "https://files.mydomain.com"

Currently, I am able to visit: https://files.mydomain.com/files. Even if I go to https://files.mydomain.com, it will redirect automatically to https://files.mydomain.com/files successfully. Instead, I would like for NGINX to automatically rewrite…
MKANET
  • 573
  • 6
  • 27
  • 51
5
votes
1 answer

How to set the proxy_protocol to 'on' in a conditional manner in nginx?

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 want to add it. Looking at the documentation there…
5
votes
1 answer

Why does nginx think my root directory is /usr/share/nginx and not /var/www/html as my configuration states?

I am new to nginx and trying to get the hang of it. I've been reading the docs, and they say if use the directive root it should tell nginx where to find requests. For example, from my understanding, root /var/www/html should tell nginx to find…
geckels1
  • 347
  • 1
  • 3
  • 13
5
votes
3 answers

How to fix 502 Bad Gateway Error in production(Nginx)?

When I tried to upload a big csv file of size about 600MB in my project which is hosted in the digital ocean, it tries to upload but shows 502 Bad Gateway Error (Nginx). The application is a data conversion application. This works fine while working…
Atom Store
  • 961
  • 1
  • 11
  • 35
5
votes
2 answers

Kubernetes Nginx Ingress file upload returning 502

I am trying to upload files from a client through an nginx ingress. I have set the following annotations on the ingress after receiving a 413 response; Annotations: nginx.ingress.kubernetes.io/body-size: 1024m …
Dan
  • 1,450
  • 1
  • 17
  • 34
5
votes
2 answers

Why there are 3 processes for nginx?

My OS is Ubuntu, I use ps -aux |grep nginx, and I've found 3 nginx's processes; so my question is why there are 3 processes for nginx? it seems one process is by root, another two from www-data: root 7833 0.0 0.0 126092 1476 ? Ss …
Y W
  • 81
  • 1
  • 6
5
votes
1 answer

Nginx accept trailing slash or no trailing slash in proxy_pass

I'm running into the following issue where I would like to be able to access a proxy passed location (React/NextJs webApp in a hosted docker container) from a home website with a trailing slash and without a trailing slash. Currently, when I…
Delrog
  • 735
  • 2
  • 11
  • 27
5
votes
2 answers

How to install a module on nginx?

When running nginx -t I get this error: nginx: [emerg] unknown directive "subs_filter_types" in /etc/nginx/sites-enabled/my.site.com.conf:285 nginx: configuration file /etc/nginx/nginx.conf test failed So I need to install the substitution filter…
CzipO2
  • 403
  • 1
  • 6
  • 15
5
votes
1 answer

How to remove the server name from the error page returned by nginx ingress controller?

I want to remove the server name from the error pages returned by the Kubernetes Nginx ingress controller. I added the server tokens to be false which takes care of the headers but when I curl or open the ingress in the browser I still get the…
5
votes
1 answer

Trouble with deploy django channels using Daphne and Nginx

I got a 502 error when I'm trying to open a website. I used the instructions from the official website link Added new file lifeline.conf at /etc/supervisor/conf.d/ lifeline.conf [fcgi-program:asgi] # TCP socket used by Nginx backend…
Jekson
  • 2,892
  • 8
  • 44
  • 79
5
votes
1 answer

Cannot use url to navigate in react through nginx

I am serving my static file using nginx(react frontend). I have used different urls like /login /user /home for each page. My nginx doesn't redirect these to my index.html file. I made some changes and now I cannot get my main page either. It…
Abdul Ahad
  • 1,221
  • 2
  • 16
  • 28
5
votes
2 answers

All Pages are Showing 404 Not Found Nginx But Homepage Working Fine

I am running a PHP Website Where all Sub Pages are showing 404 Not Found Nginx But Homepage and Admin Panel is working fine. I am running Php website which is running on Nginx Server - Here is my Default Nginx File server { listen 80…
Vijay Singh
  • 71
  • 1
  • 5
5
votes
2 answers

NGINX: Obfuscate password in access_log

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 -…
Raed
  • 519
  • 1
  • 6
  • 23
5
votes
2 answers

Nginx round robin load balancing is not as expected

We are connecting to a system where in 4 ports are exposed to serve the grpc requests. Used nginx as load balancer to forward the 4 client grpc requests with below configuration: user www-data; worker_processes auto; pid /run/nginx.pid; include…
Mahesh
  • 171
  • 3
  • 8