[fix] rng() now outputs positive int and increased nginx name bucket

- [fix] changed od flag from -i to -d to generate unsigned numbers
 - the param -i can create negative numbers in dash
 - [fix] increased server_names_hash_bucket_size to 64
 - to accommodate for large domain names with (many) subdomains
This commit is contained in:
2020-05-27 16:30:10 -04:00
parent f3d17e931a
commit a3f5fc413f
2 changed files with 4 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ function read_file()
function rng() function rng()
{ {
rng_n=$(od -An -N2 -i < /dev/urandom) rng_n=$(od -An -N2 -d < /dev/urandom)
echo $rng_n echo $rng_n
} }

View File

@@ -15,6 +15,8 @@ http {
scgi_temp_path /tmp/scgi_temp; scgi_temp_path /tmp/scgi_temp;
client_max_body_size 1m; client_max_body_size 1m;
# set larger name bucket for large domain names
server_names_hash_bucket_size 64;
server { server {
listen 8080 default_server; listen 8080 default_server;