-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathvhost.template
79 lines (60 loc) · 3.41 KB
/
vhost.template
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
server {
listen %PORT%;
# Further documentation: http://nginx.org/en/docs/http/server_names.html
server_name %HOST_LIST%;
root %BASEDIR%/web;
# Additional Assetic rules
## Don't forget to run php bin/console assetic:dump --env=prod
## and make sure to comment these out in DEV environment.
#if[SYMFONY_ENV!=dev] include ez_params.d/ez_prod_rewrite_params;
# Include image rule for DFS or binary handler
include ez_params.d/ez_rewrite_%BINARY_DATA_HANDLER%image_params;
# Include remaining ez rewrite rules
include ez_params.d/ez_rewrite_params;
# upload max size
client_max_body_size %BODY_SIZE_LIMIT_M%;
# FPM fastcgi_read_timeout
fastcgi_read_timeout %TIMEOUT_S%;
# Gzip is enabled by default on most platforms, so here we just specify mime types to compress.
# NOTE: Using gzip on text/html can be a security issue, unless you somehow pad. See http://breachattack.com
gzip_types text/plain text/css application/json text/javascript application/javascript text/xml application/xml application/xml+rss;
location / {
location ~ ^/app\.php(/|$) {
include ez_params.d/ez_fastcgi_params;
# FPM socket
# Possible values : unix:/var/run/php5-fpm.sock or 127.0.0.1:9000
fastcgi_pass %FASTCGI_PASS%;
## eZ Platform ENVIRONMENT variables, used for customizing app.php execution (not used by console commands)
# Environment.
# Possible values: "prod" and "dev" out-of-the-box, other values possible with proper configuration
# Make sure to comment the "ez_params.d/ez_prod_rewrite_params" include above in dev.
# Defaults to "prod" if omitted
#if[SYMFONY_ENV] fastcgi_param SYMFONY_ENV %SYMFONY_ENV%;
# Whether to use debugging.
# Possible values: 0 or 1
# Defaults to 0 if omitted, unless SYMFONY_ENV is set to: "dev"
#if[SYMFONY_DEBUG] fastcgi_param SYMFONY_DEBUG "%SYMFONY_DEBUG%";
# Optional: Whether to use Symfony's builtin HTTP Caching Proxy.
# Disable it if you are using an external reverse proxy (e.g. Varnish)
# Possible values: 0 or 1
# Defaults to 1 if omitted, unless SYMFONY_ENV is set to: "dev"
#if[SYMFONY_HTTP_CACHE] fastcgi_param SYMFONY_HTTP_CACHE "%SYMFONY_HTTP_CACHE%";
# Optional: Defines the proxies to trust
# Needed when using Varnish as proxy, if so disable SYMFONY_HTTP_CACHE.
# Separate entries by a comma, example: "ip1,ip2"
# Defaults to not be set if env value is omitted or empty
#if[SYMFONY_TRUSTED_PROXIES] fastcgi_param SYMFONY_TRUSTED_PROXIES "%SYMFONY_TRUSTED_PROXIES%";
# TIP: There are many more environment variables supported by eZ Platform. However unlike those listed above
# they should in most cases rather be set in the environment then in vhost config to make sure cronjobs
# and cli command usage takes them into account as well.
}
# Disable .php(3) and other executable extensions in the var directory
location ~ ^/var/.*(?i)\.(php3?|phar|phtml|sh|exe|pl|bin)$ {
return 403;
}
}
# Custom logs
# access_log %BASEDIR%/app/logs/httpd-access.log;
# error_log %BASEDIR%/app/logs/httpd-error.log notice;
include ez_params.d/ez_server_params;
}