• Bubble
  • Bubble
  • Line
osTicket not working certain things not loading nginx
Andrei Clinciu Article AUthor
Andrei Clinciu
  • 2017-12-13T20:48:00Z
  • 1 min to read

There is an  ajax issue while using using nginx with osTicket due to redirects.

Certain things will not load and if you look in your error log file you will see something like the following:

You should change /helpdesk/ to whatever subfolder you have the osTicket hosted to.
This will also solve problems in the scp but also in the normal working..

Add this to the server config
.... probably here you have other fastcti_params

set $path_info "";# Requests to /api/* need their PATH_INFO set, this does thatif ($request_uri ~ "^/helpdesk/api(/[^\\?]+)") {\tset $path_info $1;}# /api/*.* should be handled by /api/http.php if the requested file does not existlocation ~ ^/helpdesk/api/(tickets|tasks)(.*)$ {\ttry_files $uri $uri/ /helpdesk/api/http.php;}# /scp/ajax.php needs PATH_INFO too, possibly more files need it hence the .*\\.phpif ($request_uri ~ "^/helpdesk/scp/.*\\.php(/[^\\?]+)") {\tset $path_info $1;}if ($request_uri ~ "^/helpdesk/.*\\.php(/[^\\?]+)") {\tset $path_info $1;}    \tfastcgi_param  PATH_INFO    $path_info;# Make sure requests to /scp/ajax.php/some/path get handled by ajax.phplocation ~ ^/helpdesk/scp/ajax.php/(.*)$ {\ttry_files $uri $uri/ /helpdesk/scp/ajax.php;}    # Make sure requests to /ajax.php/some/path get handled by ajax.phplocation ~ ^/helpdesk/ajax.php/(.*)$ {\ttry_files $uri $uri/ /helpdesk/ajax.php;}



Ideas and comments

Andrei Clinciu
Andrei Clinciu

I'm a Full Stack Software Developer specializing in creating websites and applications which aid businesses to automate. Software which can help you simplify your life. Let's work together!

Building Great Software
The digital Revolution begins when you learn to automate with personalized software.

Find me on social media