# aptitude install nginx-naxsi-ui Nginx /etc/nginx/nginx.conf worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000;worker_rlimit_nofile 10240; #65535 events {
#/etc/init.d/nginx reload 一般來說
#vi /etc/default/nginx # Note: You may want to look at the following page before setting the ULIMIT. # Set the ulimit variable if you need defaults to change. # Example: ULIMIT="-n 4096" #ULIMIT="-n 4096" ULIMIT="-n 65536" ulimit /etc/security/limits.conf * soft nofile 65536 * hard nofile 65536 # ulimit -a # vi /etc/logrotate.d/nginx /var/log/nginx/*.log { daily missingok # rotate 52 rotate 5 compress delaycompress notifempty create 0640 www-data adm sharedscripts prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi; \ endscript postrotate [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid` endscript }
|