forked from jbroadway/elefant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
45 lines (42 loc) · 1.19 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
34
35
36
37
38
39
40
41
42
43
44
45
# This is a sample Nginx configuration for Elefant.
# Add these to your server{} block, making sure to
# adjust the root path and add any additional
# configurations you require.
# Uncomment if required
## Fast-CGI cache settings
#fastcgi_cache_path /tmp levels=1 keys_zone=CACHE:16m inactive=24h;
#fastcgi_cache_key "$scheme$request_method$host$request_uri";
#
#set $nocache "";
#if ($http_cookie ~ (PHPSESSID)) {
# set $nocache "Y";
#}
## "elefant_user" should be replaced by value of session_name from config
#if ($http_cookie ~ (elefant_user)) {
# set $nocache "Y";
#}
#
#fastcgi_cache CACHE;
#fastcgi_cache_valid 200 302 1d;
#fastcgi_cache_valid 301 1d;
#fastcgi_cache_valid any 1m;
#fastcgi_cache_min_uses 1;
#fastcgi_cache_use_stale error timeout invalid_header http_500;
#fastcgi_ignore_headers Set-Cookie Expires Cache-Control;
#fastcgi_pass_header Set-Cookie;
#
#fastcgi_cache_bypass $nocache;
#fastcgi_no_cache $nocache;
location ^~ /conf/ {
deny all;
return 403;
}
location ~ ^/(cache|apps|tests)/.*\.(php|sql)$ {
deny all;
return 403;
}
location / {
root /var/www/nginx-default;
index index.php;
try_files $uri $uri/ /index.php?$args;
}