forked from tastyigniter/TastyIgniter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.nginx.conf
33 lines (25 loc) · 1.33 KB
/
.nginx.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
## Pass requests that don't refer directly to files in the filesystem to index.php
location / { try_files $uri $uri/ /index.php?$query_string; }
## Pass the PHP scripts to FastCGI server
location ~ ^/index.php {
## Write your FPM configuration here
}
## Whitelist
location ~ ^/favicon\.ico { try_files $uri /index.php; }
location ~ ^/sitemap\.xml { try_files $uri /index.php; }
## Block all .dotfiles except well-known
location ~ /\.(?!well-known).* { deny all; }
### Let nginx return 404 if static file does not exists
location ~ ^/assets/media { try_files $uri 404; }
location ~ ^/storage/temp/public { try_files $uri 404; }
location ~ ^/app/.*/assets { try_files $uri 404; }
location ~ ^/app/.*/actions/.*/assets { try_files $uri 404; }
location ~ ^/app/.*/dashboardwidgets/.*/assets { try_files $uri 404; }
location ~ ^/app/.*/formwidgets/.*/assets { try_files $uri 404; }
location ~ ^/app/.*/widgets/.*/assets { try_files $uri 404; }
location ~ ^/extensions/.*/.*/assets { try_files $uri 404; }
location ~ ^/extensions/.*/.*/actions/.*/assets { try_files $uri 404; }
location ~ ^/extensions/.*/.*/dashboardwidgets/.*/assets { try_files $uri 404; }
location ~ ^/extensions/.*/.*/formwidgets/.*/assets { try_files $uri 404; }
location ~ ^/extensions/.*/.*/widgets/.*/assets { try_files $uri 404; }
location ~ ^/themes/.*/assets { try_files $uri 404; }