-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathnginx.conf
executable file
·128 lines (96 loc) · 3.1 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
events {}
http {
include mime.types;
server {
listen 80;
server_name "sqstorage";
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
index index.php index.html;
root /app;
location / {
try_files $uri /index.php;
index index.php index.html;
}
location ~ [^/]\.php(/|$) {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $fastcgi_script_name =404;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_pass php:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location = /index {
rewrite ^/index(.*)$ /index.php$1 last;
}
location = /entry {
rewrite ^/entry(.*)$ /entry.php$1 last;
}
location /entry {
rewrite ^/entry/editItem=([0-9]+)$ /entry.php?editItem=$1 last;
}
location /item {
rewrite ^/item/([0-9]+)$ /entry.php?editItem=$1 last;
}
location = /items {
rewrite ^(.*)$ /inventory.php last;
}
location = /items/new {
rewrite ^(.*)$ /index.php last;
}
location = /inventory {
rewrite ^(.*)$ /inventory.php last;
}
location = /categories {
rewrite ^(.*)$ /categories.php last;
}
location /categories {
rewrite ^/categories(\?.*)$ /categories.php$1 last;
rewrite ^/categories/([0-9]+)$ /inventory.php?category=$1 last;
}
location = /transfer {
rewrite ^(.*)$ /transfer.php last;
}
location = /datafields {
rewrite ^(.*)$ /datafields.php last;
}
location = /settings {
rewrite ^(.*)$ /settings.php last;
}
location /settings {
rewrite ^/settings/editUser=([0-9])+$ /settings.php/editUser=$1 last;
rewrite ^/settings/removeUser=([0-9])+$ /settings.php/removeUser=$1 last;
rewrite ^/settings?addUser$ /settings.php?addUser last;
}
location = /api {
rewrite ^(.*)$ /api.php last;
}
location /api {
rewrite ^/api/(.*)$ /api.php/$1 last;
}
location = /login {
rewrite ^(.*)$ /login.php last;
}
location /login {
rewrite ^/login/activate=(.*)+$ /login.php/activate=$1 last;
}
location = /subcategories {
rewrite ^(.*)$ /subcategories.php last;
}
location /subcategories {
rewrite ^/subcategories/([0-9]+)$ /inventory.php?subcategory=$1 last;
}
location = /welcome {
rewrite ^(.*)$ /welcome.php last;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
}