月度归档:2019年10月

nginx 配置模板

静态html

server {
    listen 80;
    server_name  _;
    root   /home/www;
    index  index.html;
}

http 跳转 https

server {
    listen 80;
    server_name  domain;

    return 301   https://$host$request_uri;
    #rewrite ^(.*)$  https://$host$1 permanent;
}

继续阅读

crontab 定时任务

通过crontab 命令,我们可以在固定的间隔时间执行指定的系统指令或 shell script脚本。时间间隔的单位可以是分钟、小时、日、月、周及以上的任意组合。这个命令非常适合周期性的日志分析或数据备份等工作。

继续阅读