更新我的 NGINX 配置文件

最新版配置文件:My-NGINX-Config

不需要多创建两个虚拟机了。。。简洁多了,哈哈哈

2015,11,01,懒得管配置文件了。。。直接去我的

—>>> NGINX 配置文件仓库

sites/gehaowu.com.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
server {
server_name gehaowu.com www.gehaowu.com;
include includes/listen_full.template;
include includes/header_add.template;
include includes/headers_set_more.template;
include sites/rewrite.gehaowu.com.template;
ssl_certificate keys/www.gehaowu.com.crt;
ssl_certificate_key keys/www.gehaowu.com.key;
ssl_trusted_certificate keys/startcom_ssl_trusted_certificate.crt;
ssl_dhparam keys/dhparam.pem;
ssl_ecdh_curve secp384r1;
include includes/ssl.template;
include includes/ssl_stapling.template;
set $rewriterule https;
if ($scheme = https) {
set $rewriterule "${rewriterule}1";
}
if ($host ~* ^www.) {
set $rewriterule "${rewriterule}2";
}
if ($rewriterule != "https12") {
return 301 https://www.gehaowu.com$request_uri;
}
include includes/block_files.template;
include includes/expires.template;
index index.html index.htm;
root /usr/home/wwwroot/www.gehaowu.com;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
access_log /usr/home/wwwroot/logs/gehaowu.com.access.log;
error_log /usr/home/wwwroot/logs/gehaowu.com.error.log;
}

强制拉取 Github 仓库内容

让 anonymouscoward 君给帮忙写了个 github 同步脚本。。哈哈哈

完美解决 github 同步的麻烦问题了

将脚本加入 cron 定时执行就可以了,

———————————————

如果出现代码需要合并啥的不正常 git pull 情况,

则执行脚本会直接删除仓库,然后重新 git clone 仓库回来。。

———————————————

( ̄︶ ̄)↗ 飕装逼了~~~

Read More

MINGW64环境更新HEXO到Github提示TTY错误

最近碰到好多朋友使用 MINGW64 使用 Github + HEXO 搭建博客的时候提示下列错误,

ERROR INFO

1
2
3
4
5
6
7
8
9
10
 #Code Star
The file will have its original line endings in your working directory.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid argument
#Code End

目测是 终端 哪个地方出问题,

Read More