diff --git a/CHANGELOG.md b/CHANGELOG.md index 39e99ea8..36ed9320 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Calender/Contacts: Web: * If a custom DNS record is set on a domain or 'www'+domain, web would not be served for that domain. If the custom DNS record is just the box's IP address, that's a configuration mistake, but allow it and let web continue to be served. +* Accommodate really long domain names by increasing an nginx setting. Control panel: diff --git a/setup/web.sh b/setup/web.sh index ff7d78b4..9f1fdfb7 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -29,9 +29,14 @@ sed "s#STORAGE_ROOT#$STORAGE_ROOT#" \ conf/nginx-ssl.conf > /etc/nginx/nginx-ssl.conf # Fix some nginx defaults. -# The server_names_hash_bucket_size seems to prevent long domain names? +# The server_names_hash_bucket_size seems to prevent long domain names! +# The default, according to nginx's docs, depends on "the size of the +# processor’s cache line." It could be as low as 32. We fixed it at +# 64 in 2014 to accommodate a long domain name (20 characters?). But +# even at 64, a 58-character domain name won't work (#93), so now +# we're going up to 128. tools/editconf.py /etc/nginx/nginx.conf -s \ - server_names_hash_bucket_size="64;" + server_names_hash_bucket_size="128;" # Tell PHP not to expose its version number in the X-Powered-By header. tools/editconf.py /etc/php5/fpm/php.ini -c ';' \