myos/docker/http/alpine/httpd-vhosts.ctmpl

22 lines
771 B
Plaintext
Raw Normal View History

2021-02-09 17:05:00 +01:00
{{ $serverName := printf "%s.%s.%s" (env "APP") (env "ENV") (env "USER") }}
{{ $serviceName := printf "%s-%s-%s-php-9000" (env "USER") (env "ENV") (env "APP") }}
<VirtualHost *:80>
2021-06-13 02:09:57 +02:00
ServerAdmin support+apache@asycn.io
2021-02-09 17:05:00 +01:00
DocumentRoot "/var/www/web"
ServerName {{ $serverName }}
ServerAlias *
<FilesMatch "\.php$">
SetHandler "proxy:balancer://php/"
</FilesMatch>
<Proxy "balancer://php/">
{{ range service $serviceName }} BalancerMember "fcgi://{{ .Address }}:{{ .Port }}/" disablereuse=On timeout=900
{{ end }} ProxySet lbmethod=bybusyness
</Proxy>
<Directory /var/www/web>
AllowOverride All
CGIPassAuth On
Options +FollowSymLinks
Require all granted
</Directory>
</VirtualHost>