Skip to content

Instantly share code, notes, and snippets.

@vidplace7
Created November 16, 2015 17:39
Show Gist options
  • Save vidplace7/33e9b1c5917ed3c32d57 to your computer and use it in GitHub Desktop.
Save vidplace7/33e9b1c5917ed3c32d57 to your computer and use it in GitHub Desktop.
OSTicket Config
server {
listen 80;
server_name YOUR_HOSTNAME;
keepalive_timeout 70;
root /var/www/OSTicket/upload;
index index.php index.html index.htm;
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 ~ \.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:8888;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment