forked from CampbellSoftwareSolutions/docker-osticket
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvirtualhost
More file actions
58 lines (44 loc) · 1.36 KB
/
Copy pathvirtualhost
File metadata and controls
58 lines (44 loc) · 1.36 KB
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
server {
listen 80;
root /data/upload;
index index.html index.htm index.php;
server_name localhost;
access_log /var/log/nginx/osticket-access.log;
error_log /var/log/nginx/osticket-error.log error;
charset utf-8;
set $path_info "";
location ~ /include {
deny all;
return 403;
}
if ($request_uri ~ "^/api(/[^\?]+)") {
set $path_info $1;
}
location ~ ^/api/(?:tickets|tasks).*$ {
try_files $uri $uri/ /api/http.php?$query_string;
}
if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
set $path_info $1;
}
location ~ ^/scp/ajax.php/.*$ {
try_files $uri $uri/ /scp/ajax.php?$query_string;
}
location / {
try_files $uri $uri/ index.php;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { access_log off; log_not_found off; }
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param LARA_ENV local; # Environment variable for Laravel
fastcgi_param PATH_INFO $path_info;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}