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}
}    
Toby Allen
  • 10,997
  • 11
  • 73
  • 124
Xiu Hong
  • 181
  • 2
  • 8

1 Answers1

0

as pointed out by your comment what you are trying to do with your caddyfile is not possible.

You need to specify each host and its root directory explicitly.

Toby Allen
  • 10,997
  • 11
  • 73
  • 124