-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.conf
39 lines (32 loc) · 1.02 KB
/
default.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
37
38
39
server {
if (-d /var/www/html/${WEB_FOLDER_PATH}/web) {
set $publicFolder "web";
set $frontController "app_dev.php";
}
if (-d /var/www/html/${WEB_FOLDER_PATH}/public) {
set $publicFolder "public";
set $frontController "index_dev.php";
}
server_name ${SERVER_NAME};
root /var/www/html/${WEB_FOLDER_PATH}/$publicFolder/;
index $frontController;
location / {
try_files $uri $uri/ @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /$frontController/$1 last;
}
location ~ [^/]\.php(/|$) {
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_index $frontController;
fastcgi_buffers 4 256k;
fastcgi_buffer_size 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 10m;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}