我正在尝试使用多个虚拟主机配置 Caddy FastCGI。据我所知,以下 Caddyfile 应该可以工作:
gzip
tls support@mydomain.com
errors /var/log/caddy/error.log
header / Strict-Transport-Security "max-age=15768000;"
portal.mydomain.info {
fastcgi / 127.0.0.1:3000 {
root /var/www/portal
ext .php
index index.php
}
}
urlf.mydomain.info {
fastcgi / 127.0.0.1:3001 {
root /var/www/urlf
ext .php
index index.php
}
}
但是 Caddy 无法以错误开始:
Feb 2 04:33:58 ip-172-31-24-38 caddy[3135]: 2018/02/02 04:33:58 /etc/caddy/Caddyfile:7 - Error during parsing: Unknown directive 'portal.mydomain.info'