jjsa
(JeanJacques Sarton)
August 20, 2019, 8:12am
1
If we want to serve multiple subdomains on the same server the Caddyfile may look as follow:
www.example.com {
root /webspace/www
import common.conf
}
forum.example.com {
root /webspace/forum
import common.conf
}
Within the declaration of the URL we need only the parts which are only for the sub domain.
the file common.conf may look as follow:
gzip
fastcgi / /run/php/php7.0-fpm.sock php {
index index.php
}
matt
(Matt Holt)
August 20, 2019, 6:18pm
2
Are you asking for a “common” area in the Caddyfile? i.e. block inheritance?
jjsa
(JeanJacques Sarton)
August 21, 2019, 9:27am
3
No common is a file containing configuration common for all virtual hosts declared within the main configurations file. My post may be seen as example.
1 Like
magikstm
(Magikstm)
August 21, 2019, 9:46pm
4
See:
https://caddyserver.com/docs/import
I believe that may be what you wish to use.
1 Like
system
(system)
Closed
November 19, 2019, 9:46pm
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.