add nginx proxy

This commit is contained in:
Yann Autissier
2022-12-10 17:58:25 +00:00
parent 92dcf23fdd
commit 1d1b5156bc
52 changed files with 442 additions and 173 deletions
+21
View File
@@ -0,0 +1,21 @@
{{ $serverName := printf "%s.%s.%s" (env "ENV") (env "APP") (env "USER") }}
{{ $serviceName := printf "%s-%s-%s-php-9000" (env "USER") (env "APP") (env "ENV") }}
<VirtualHost *:80>
ServerAdmin support+apache@asycn.io
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>