-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathengine.conf.j2
32 lines (25 loc) · 1.15 KB
/
engine.conf.j2
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
Listen {{ apache_app_listen_address.engine }}:{{ loadbalancing.engine.port }}
<Virtualhost {{ apache_app_listen_address.engine }}:{{ loadbalancing.engine.port }}>
ServerAdmin {{ apache_server_admin}}
DocumentRoot {{ engine_current_release_symlink }}/web
ServerName {{ engine_domain }}
<Directory "{{ engine_current_release_symlink }}/web">
Require all granted
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app{% if develop %}_dev{% endif %}.php [QSA,L]
</Directory>
SetEnv ENGINEBLOCK_ENV {{ engine_apache_environment }}
SetEnv SYMFONY_ENV {{ engine_apache_symfony_environment }}
SetEnv HTTPS on
RewriteEngine On
# We support only GET/POST/HEAD
RewriteCond %{REQUEST_METHOD} !^(POST|GET|HEAD)$
RewriteRule .* - [R=405,L]
#Proxy the requests to FPM
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:{{ engine_fpm_port }}/{{ engine_current_release_symlink }}/web/$1
ErrorLog "|/usr/bin/logger -p local3.err -t 'Apache-EB'"
CustomLog "|/usr/bin/logger -p local3.info -t 'Apache-EB'" combined
</VirtualHost>