-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathsubrion.conf
45 lines (36 loc) · 954 Bytes
/
subrion.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
root /home/u1/domains/example.com;
index index.php;
charset utf-8;
location ~* ^/(favicon.ico|robots.txt)$ {
allow all;
access_log off;
log_not_found off;
}
# route all requests to index.php
location / {
try_files $uri $uri/ /index.php?_p=$uri&$args;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-example.com.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# route installation requests
location /install/ {
rewrite ^/install/(.*)$ /install/index.php?_p=$1;
}
# deny access to apache .htaccess files
location ~ /\.ht
{
deny all;
}
# route admin dashboard requests
location /admin/ {
rewrite ^/admin/(.*)$ /index.php?_p=admin/$1&$args;
}
# cache static files
location ~* ^.+.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|htm|html|js|css|mp3|swf|ico|flv|woff|ttf) {
access_log off;
expires 30d;
}