0

i want to write one config for multiple sites.
these sites domain will like : x.localhost, y.localhost
but occur some errors.
this is error message:

caddy_1 | 18/Jan/2018:09:33:43 +0000 [ERROR 0 /index.php] Primary script unknown

caddy_1 | 172.20.0.1 - - [18/Jan/2018:09:33:43 +0000] "GET /index.php HTTP/1.1" 404 40

caddy_1 | xxx.localhost

*.localhost:80 {
    root /var/www/{hostonly}/public
    fastcgi / php-fpm:9000 php {
        index index.php
    }
    rewrite {
        to {path} {path}/ /index.php?{query}
    }
    gzip
    browse
    log stdout
    errors stdout
    log / stdout {hostonly}
}    
4

1 回答 1

0

正如您的评论所指出的那样,您试图对您的 caddyfile 执行的操作是不可能的。

您需要明确指定每个主机及其根目录。

于 2018-01-19T08:14:32.677 回答