-
Pipe 安装补充说明
2018-09-06 23:56我配了 https 一个 blog.conf 一个 blogadmin.conf
blog.conf
upstream pipe { server 127.0.0.1:5897; } server { listen 80; server_name www.xhxblog.cn; rewrite ^(.*)$ https://www.xhxblog.cn; } server { listen 443 ssl; server_name www.xhxblog.cn; ssl on; ssl_certificate www.xhxblog.cn.crt; ssl_certificate_key www.xhxblog.cn.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; index index.jsp index.html; location = /halt.html { root /root/go/src/pipe/; } location / { proxy_pass http://pipe/blogs/TwelveShaw/; } }
blogadmin.conf
server{ listen 80; server_name admin.xhxblog.cn; rewrite ^(.*)$ https://admin.xhxblog.cn; } server { listen 443 ssl; server_name admin.xhxblog.cn; ssl on; ssl_certificate admin.xhxblog.cn.crt; ssl_certificate_key admin.xhxblog.cn.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; index index.jsp index.html; location = /halt.html { root /root/go/src/pipe/theme; } location / { proxy_pass http://pipe$request_uri; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; client_max_body_size 10m; } error_page 502 503 /halt.html; }
然后按照前面的 把 pipe 的 server 改成 admin.xhxblog.cn 用来管理后台
-
golang 协程交替执行, 使其能顺序输出 1-20 的自然数
2018-05-02 20:42可以这么说吧,只是 golang 里面用的 channel,接收不到值就阻塞 <-ch1 放在 say1 中接收 <-ch2 在 say 中接收 没有值的时候是阻塞的