Nginx 隐藏版本
查看方法
[root@localhost bbs]# curl -I http://192.168.235.133
[root@localhost conf]# vim nginx.conf
[root@localhost conf]# systemctl restart nginx
[root@localhost conf]# curl -I http://192.168.235.133
[root@localhost nginx-1.15.9]# ./configure \
> --prefix=/usr/local/nginx \
> --user=nginx \
> --group=nginx \
> --with-http_stub_status_module
make && make install
[root@localhost nginx-1.15.9]# vim /usr/local/nginx/conf/nginx.conf
[root@localhost nginx-1.15.9]# systemctl stop nginx
[root@localhost nginx-1.15.9]# systemctl start nginx
[root@localhost nginx-1.15.9]# curl I http://192.168.235.133
设置缓存时间
[root@localhost nginx-1.15.9]# vim /usr/local/nginx/conf/nginx.conf
[root@localhost html]# vim index.html
[root@localhost html]# systemctl restart nginx[root@localhost html]# curl I http://192.168.235.133/cat.jpg
日志分割
[root@localhost opt]# vim fenge.sh
[root@localhost opt]# systemctl start nginx[root@localhost opt]# netstat -natp | grep nginx
[root@localhost opt]# chmod +x fenge.sh
[root@localhost opt]# ls /var/log/nginx
[root@localhost opt]# crontab -ecrontab: installing new crontab