Tag Archive ‘nginx’

 

CharlyBr on Nov 14th, 2008Fix nginx increase server_names_hash_bucket_size error

When adding new virtual hosts in your nginx configuration file, you can experience this error message:
# nginx -t
2008/11/13 09:37:03 [emerg] 12299#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
2008/11/13 09:37:03 [emerg] 12299#0: the configuration file /etc/nginx/nginx.conf test failed
server_names_hash_bucket_size controls the maximum length of a virtual host entry (ie the length of the domain [...]

CharlyBr on Jul 17th, 2008Rotate Nginx log files under FreeBSD

To rotate your nginx log files, you can use the log file handler provided by FreeBSD: newsyslog.
Configuring /etc/newsyslog.conf
/var/log/nginx-access.log               644  7     1024 *     JC /var/run/nginx.pid
/var/log/nginx-error.log                644  7     1024 *     JC /var/run/nginx.pid
Before log rotation:
-rw-r–r–  1 root  wheel    104278002 Jul 16 11:35 nginx-access.log
-rw-r–r–  1 root  wheel      1509531 Jul 16 11:17 nginx-error.log
After log rotation:
-rw-r–r–  1 root  wheel        967 Jul [...]