-
Notifications
You must be signed in to change notification settings - Fork 25
/
oliker.conf
50 lines (45 loc) · 1.5 KB
/
oliker.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
46
47
48
49
50
server {
listen 80;
server_name oliker.localhost;
root /usr/share/nginx/html/oliker;
index index.html index.php;
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
# gzip_comp_level 9;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
# gzip_http_version 1.1;
gzip_types text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;
rewrite ^/api/ /server/php/Slim/public/index.php;
rewrite ^/ipn/process_ipn/(.*)/(.*)/(.*)$ /server/php/Slim/public/process_ipn.php?model=$1&id=$2&hash=$3 last;
if ($args ~ "_escaped_fragment_") {
rewrite ^ /server/php/Slim/public/seo.php?path=$1 last;
}
location / {
root /usr/share/nginx/html/oliker/client;
}
location ~ /api_explorer {
root /usr/share/nginx/html/oliker;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico) {
root /usr/share/nginx/html/oliker/client;
if (-f $request_filename) {
break;
}
rewrite ^/scripts/(plugins.[a-z0-9]*.js)$ /server/php/plugin.php?file=$1 last;
rewrite ^/images/([a-zA-Z_]*)/([a-zA-Z_]*)/(.*)$ /server/php/image.php?size=$1&model=$2&filename=$3 last;
auth_basic off;
add_header Cache-Control public;
add_header Cache-Control must-revalidate;
expires 7d;
}
}