-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathlaravel.conf.tmpl
43 lines (34 loc) · 1.56 KB
/
laravel.conf.tmpl
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
{{ $static := (getenv "NGINX_STATIC_EXT_REGEX" "css|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg|mp4|svgz|ogg|ogv|pdf|pptx?|zip|tgz|gz|rar|bz2|doc|xls|exe|tar|mid|midi|wav|bmp|rtf|txt|map|webp") }}
include fastcgi.conf;
{{ $index := (getenv "NGINX_FASTCGI_INDEX" "index.php") }}
index {{ getenv "NGINX_INDEX_FILE" "index.php index.html" }};
location / {
location ~* /livewire/preview-file {
expires off;
try_files $uri /{{ $index }}?$args;
}
location ~* /livewire/livewire.js {
expires off;
try_files $uri /{{ $index }}?$args;
}
location ~* ^.+\.(?:{{ $static }})$ {
access_log {{ getenv "NGINX_STATIC_ACCESS_LOG" "off" }};
tcp_nodelay {{ getenv "NGINX_STATIC_TCP_NODELAY" "off" }};
expires {{ getenv "NGINX_STATIC_EXPIRES" "1y" }};
add_header Pragma "cache";
add_header Cache-Control "public";
open_file_cache {{ getenv "NGINX_STATIC_OPEN_FILE_CACHE" "max=1000 inactive=30s" }};
open_file_cache_valid {{ getenv "NGINX_STATIC_OPEN_FILE_CACHE_VALID" "30s" }};
open_file_cache_min_uses {{ getenv "NGINX_STATIC_OPEN_FILE_CACHE_MIN_USES" "2" }};
open_file_cache_errors {{ getenv "NGINX_STATIC_OPEN_FILE_CACHE_ERRORS" "off" }};
{{- if getenv "NGINX_STATIC_404_TRY_INDEX" }}
try_files $uri /{{ $index }}?$args;
{{- end }}
}
try_files $uri /{{ $index }}?$args;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass php;
track_uploads {{ getenv "NGINX_TRACK_UPLOADS" "uploads 60s" }};
}