幸福飞过海 - 2012年11月 https://fengqi.me/2012/11/ zh-CN 风起的网络记事本 Mon, 19 Nov 2012 02:58:00 +0000 Mon, 19 Nov 2012 02:58:00 +0000 [记录]Centos/Redhat非正常关机的自动磁盘修复配置 https://fengqi.me/unix/104.html https://fengqi.me/unix/104.html Mon, 19 Nov 2012 02:58:00 +0000 风起 很简单, 一小段配置就行:

vi /etc/sysconfig/autofsck
AUTOFSCK_DEF_CHECK=yes 
PROMPT=yes

保存, 退出, 就行了

]]>
0 https://fengqi.me/unix/104.html#comments https://fengqi.me/feed/2012/11/
[转载]nginx关闭favicon.ico 日志记录 禁止访问隐藏文件 https://fengqi.me/php/103.html https://fengqi.me/php/103.html Sun, 11 Nov 2012 13:30:00 +0000 风起 原文链接: nginx关闭favicon.ico 日志记录 禁止访问隐藏文件

把以下配置放到 server {} 块.

关闭favicon.ico不存在时记录日志

location /favicon.ico {
    log_not_found off;
    access_log off;
}

不允许访问隐藏文件例如 .htaccess, .htpasswd, .DS_Store (Mac).

location ~ /\. {
    deny all;
    access_log off;
    log_not_found off;
}


]]>
0 https://fengqi.me/php/103.html#comments https://fengqi.me/feed/2012/11/
[原创]ssh监听多个端口 https://fengqi.me/unix/102.html https://fengqi.me/unix/102.html Sat, 10 Nov 2012 14:26:00 +0000 风起 参考地址: SSH服务监听多个端口

因为是在家里跑个pc, ADSL DDNS外网连接, 所以常用的21 22 3308 443 80啊这些肯定是不能直接使用啦(也为了安全), 但是又为了方便, 所以ssh nginx都要同时监听22 80 和另外的端口提供给外网链接.

ssh监听多个端口的方法很简单:

vi /etc/ssh/sshd_config
Port 22
Port 8022 #这样就行啦, 想再多个端口就这样多写几个
service sshd restart #重启sshd就ok了

当然呢, 也才可以查看上面的参考地址, 使用ListenAddress, 效果也是一样滴.

]]>
0 https://fengqi.me/unix/102.html#comments https://fengqi.me/feed/2012/11/