forked from CampbellSoftwareSolutions/docker-osticket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
85 lines (64 loc) · 1.98 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
user www-data;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 2;
client_max_body_size 100m;
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 {
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;
}
if ($request_uri ~ "^/ajax.php(/[^\?]+)") {
set $path_info $1;
}
location ~ ^/ajax.php/.*$ {
try_files $uri $uri/ /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 [::]:9000;
client_max_body_size 100m;
}
}
}
daemon off;