kill -USR1 `cat /usr/local/nginx/nginx.pid`
2、设置crontab,每天凌晨00:00切割nginx访问日志
crontab -e
00 00 * * * /bin/bash /usr/local/nginx/sbin/cut_nginx_log.sh
20.配置nginx虚拟主机
Sina和sohu域名事先解析
Vi /usr/local/nginx/conf/nginx.conf
==èwww.sina.com公司网站
server {
listen 80;
server_name www.sina.com;
access_log logs/sina.access.log main;
location / {
root /web/sina;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ .php$ {
root /web/sina;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
==èwww.sohu.com公司网站
server {
listen 80;
server_name www.sohu.com;
access_log logs/sohu.access.log main;
location / {
root /web/sohu;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;








