• 行走
  • 一键构建Alpine + Caddy + PHP + Typecho运行环境。

wget --no-check-certificate https://github.com/ylqjgm/Alpine/raw/master/alpine.sh && chmod + x alpine.sh && ./alpine.sh

OpenVZ平台Alpine Linux一键安装脚本

wget https://www.moerats.com/usr/shell/alpine.sh && bash alpine.sh

一键安装Caddy + PHP7 + Sqlite3环境

wget -N --no-check-certificate git.io/c.sh && chmod +x c.sh && bash c.sh


此问题出现在全新安装的AlpineLinux上,具体表现为wget文件时,如果是http链接,可以正常wget到,如果是https链接,就会提示wget: error getting response: Connection reset by peer。

类似于此图:

cikeblog:~# wget cikeblog.com/s/alpiness.sh
Connecting to cikeblog.com (159.138.1.106:80)
Connecting to cikeblog.com (159.138.1.106:443)
wget: error getting response: Connection reset by peer
解决办法:
apk update
apk add ca-certificates
update-ca-certificates
apk --no-cache add openssl wget
Alpine终端执行以上代码后,即可wget到https链接的文件。

过程:首先怀疑是证书问题,安装ca-certificates证书,问题复现,然后重新安装一下wget,问题解决。

参考文章:https://github.com/Yelp/dumb-init/issues/73
echo "32m.tssz.cf {
  gzip
  tls admin@tssz.cf
  root /root/www
  fastcgi / /data/run/php-fpm.sock php
  rewrite {
    if {path} not_match ^\/admin
    to {path} {path}/ /index.php?{query}
  }
}" > /etc/caddy/caddy.conf
www.example.com
gzip
tls admin@example.com
fastcgi / 127.0.0.1:9000 php

后台运行 Caddy

nohup caddy -conf=/etc/caddy.conf >> /usr/local/caddy.log 2>&1 &