Questions tagged [nginx-config]

2020 questions
185
votes
4 answers

How to edit nginx.conf to increase file size upload

I want to increase the maximum file size that can be uploaded. After doing some research online, I found that you have to edit the file 'nginx.conf'. The only way I can currently access this file is by going through Putty and typing in the…
Jeff P.
  • 2,754
  • 5
  • 19
  • 41
78
votes
1 answer

Guide on how to use regex in Nginx location block section?

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 documented?
intika
  • 8,448
  • 5
  • 36
  • 55
42
votes
9 answers

Vuejs app showing Invalid host header error loop

I was running a vuejs app on its own dev server, now I can access the site by public IP of machine, But after pointing it with a domain using nginx its showing an error loop in console error in console Invalid Host header [WDS] Disconnected! Due to…
PRAJIN PRAKASH
  • 1,366
  • 1
  • 15
  • 31
41
votes
4 answers

Setting a trace id in nginx load balancer

I'm using nginx as a load balancer in front of several upstream app servers and I want to set a trace id to use to correlate requests with the app server logs. What's the best way to do that in Nginx, is there a good 3rd party module for…
danny
  • 10,103
  • 10
  • 50
  • 57
32
votes
4 answers

Nginx SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share

I got this error in nginx error log: SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking I use Let's Encrypt currently. Any ideas to solve this problem? Thank you, guys.
Justin
  • 481
  • 1
  • 6
  • 11
31
votes
4 answers

nginx redirect loop, remove index.php from url

I want any requests like http://example.com/whatever/index.php, to do a 301 redirect to http://example.com/whatever/. I tried adding: rewrite ^(.*/)index.php$ $1 permanent; location / { index index.php; } The problem here, this rewrite…
jcampbell1
  • 4,159
  • 3
  • 33
  • 35
26
votes
6 answers

nginx location 404 not found

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 location for directory /usr/share/nginx/public…
21
votes
2 answers

Meaning of max size of Nginx "large_client_header_buffers" directive

Nginx docs. Syntax: large_client_header_buffers number size; Default: large_client_header_buffers 4 8k; Context: http, server Sets the maximum number and size of buffers used for reading large client request header. I understand what the buffers…
t_uma66
  • 211
  • 1
  • 2
  • 4
18
votes
1 answer

Cannot start service web: OCI runtime create failed:

can I ask some help please when I execute the command docker-compose up -d I get error can you help me how can I execute php using nginx Removing nginx-container mysql-container is up-to-date php-container is up-to-date Recreating…
jemz
  • 4,987
  • 18
  • 62
  • 102
17
votes
4 answers

How to setup custom 503 error page in Nginx that intercepts all requests?

I learned how to get NGINX to return 503 customer error pages, but I cannot find out how to do the following: Sample config file: location / { root www; index index.php; try_files /503.html =503; } error_page…
suchislife
  • 4,251
  • 10
  • 47
  • 78
16
votes
0 answers

Reverse proxy with keepalive and re-resolve DNS according to TTL in nginx

Upstream blocks in nginx open source allow you to enable keepalive connections to reverse-proxied servers (docs: http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive). Syntax: keepalive connections; Default: — Context:…
Nick Meyer
  • 1,771
  • 1
  • 17
  • 29
15
votes
1 answer

Nginx, how to start service with ngx_http_sub_module enabled

How to start Nginx as service with this module? According to this documentation, it says: This module is not built by default, it should be enabled with the --with-http_sub_module configuration parameter. I don't understand where to enter this…
Mr.D
  • 7,353
  • 13
  • 60
  • 119
15
votes
4 answers

NGINX + Let's encrypt: Could not automatically find a matching server block

I'm publishing a website made with Python Pyramid on an Ubuntu 18.04 server. The website is running properly on HTTP and now I'm trying to make it run on HTTPS by following this article but when trying to install I get this message: IMPORTANT…
André Luiz
  • 6,642
  • 9
  • 55
  • 105
14
votes
1 answer

Nginx - use proxy_cache_lock logic when cache expired in order to avoid multi-upstram request

Proxy_cache_lock logic means that when NGINX receives couple of request simultaneously, it sends only one upstream and the rest waiting till the first one returns and insert to cache (wait time is as configure in proxy_cache_lock_timeout). If the…
dWinder
  • 11,597
  • 3
  • 24
  • 39
13
votes
2 answers

CORS problem if "Content-type": "multipart/form-data"

I have two domains (example.com for client, api.example.com for rest API) where I request from client to API considering CORS policy. Preflight request works as expected and every other requests (GET/POST/PUT/DELTE) work well except file upload,…
mst
  • 354
  • 1
  • 2
  • 15
1
2 3
99 100