server { server_name domain.com; rewrite ^(.*)$ http://www.domain.com$1 permanent; }
-
Home > Archives for March, 2009
server { server_name domain.com; rewrite ^(.*)$ http://www.domain.com$1 permanent; }
While monitoring a http/php server, I needed to do some statistics about php-cgi memory usage. Playing with memory_limit in PHP, we wanted to know the average memory usage per php-cgi process. This is easily calculated with our best friend awk. First, get the number of php running processes: # ps aux | grep php-cgi | [...]
While reading articles about optimization, I read about the accf_http module. The man page of the module is here, where you can read: The utility of accf_http is such that a server will not have to context switch several times before performing the initial parsing of the request. To load this module, use the following [...]
On some of freshly installed servers (Debian Etch), I encountered these error messages in /var/log/munin/munin-node.log: Use of uninitialized value in eval {block} exit at /usr/sbin/munin-node line 456, <CHILD> line 8. What a great error message After digging into Google results, I found it was just a problem with host_name variable in the configuration. Default value [...]
If you encounter this warning message under Linux: 2009/03/09 21:23:19 [warn] 26827#0: 4096 worker_connections are more than open file resource limit: 1024 A solution is to use the command ulimit in nginx start script, just before lunching nginx: [...] ulimit -n 65536 [...]