-
Notifications
You must be signed in to change notification settings - Fork 24
/
ofos.conf
51 lines (46 loc) · 1.58 KB
/
ofos.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
51
server {
listen 80;
server_name ofos.dev1.agriya.com;
root /usr/share/nginx/html/ofos;
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/(.*)/hash/(.*)/(.*)$ /server/php/Slim/public/process_ipn.php?id=$1&hash=$2&type=$3 last;
rewrite ^/ipn/process_ipn/(.*)/hash/(.*)$ /server/php/Slim/public/process_ipn.php?session_id=$1&hash=$2 last;
if ($args ~ "_escaped_fragment_") {
rewrite ^ /server/php/Slim/public/seo.php?path=$1 last;
}
location / {
root /usr/share/nginx/html/ofos/client;
index index.html index.php;
}
rewrite ^/scripts/(plugins.[a-z0-9]*.js)$ /server/php/plugin.php?file=$1 last;
location ~ /api_explorer {
root /usr/share/nginx/html/ofos;
}
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 ~* \.(jpg|jpeg|gif|png|bmp|ico|svg) {
root /usr/share/nginx/html/ofos/client;
if (-f $request_filename) {
break;
}
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;
}
}