-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathphp-fpm.conf
36 lines (29 loc) · 1.07 KB
/
php-fpm.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{% macro get_httpd_root() -%}
{% if httpd_root is defined %}/var/www/html/{{ httpd_root }}{% else %}/var/www/html{% endif %}
{%- endmacro %}
DocumentRoot "{{ get_httpd_root() }}"
<Directory "{{ get_httpd_root() }}">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
RemoteIPHeader {{ httpd_remoteipheader|default('X-Forwarded-For') }}
{% if httpd_remoteipinternalproxy is defined -%}
RemoteIPInternalProxy {{ httpd_remoteipinternalproxy }}
{% else -%}
RemoteIPInternalProxy 10.0.0.0/8
RemoteIPInternalProxy 172.16.0.0/12
RemoteIPInternalProxy 192.168.0.0/16
{% endif -%}
DirectoryIndex index.php index.html index.htm
<LocationMatch "^/(.*\.php)$">
ProxyPass fcgi://127.0.0.1:9000{{ get_httpd_root() }}/$1 connectiontimeout=10 timeout={{ timeout|default('30')|int('30') }}
</LocationMatch>
<FilesMatch "\.ph(p[345]?|t|tml|ps)$">
Require all denied
</FilesMatch>
LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "/dev/stdout" combined
ErrorLog "/dev/stderr"
ServerTokens Minor
ServerSignature On