Nginx Osticket
Nginx config untuk Osticket 1.7.x dan 1.8.x. Sudah ditest di osticket versi 1.7.x dan 1.8 tidak ada masalah::
server {
listen 80; ## listen for ipv4; this line is default and implied
root /var/www/ldaphelpdesk;
index index.php;
client_max_body_size 20M;
server_name aa.bb.cc.co.id;
server_name_in_redirect off;
access_log /var/log/nginx/osticket/ldap_access_ldap_helpdesk.log;
error_log /var/log/nginx/osticket/ldap_error_ldap_helpdesk.log warn;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ index.php;
proxy_read_timeout 300;
}
error_page 404 /404.html;
error_page 403 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
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 ~ ^/ajax.php/.*$ {
try_files $uri $uri/ /ajax.php?$query_string;
}
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param PATH_INFO $path_info;
fastcgi_pass 127.0.0.1:9000;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}