osTicket not working certain things not loading nginx

osTicket not working certain things not loading nginx

Show table of contents

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 that
	if ($request_uri ~ "^/helpdesk/api(/[^\?]+)") {
		set $path_info $1;
	}

	# /api/*.* should be handled by /api/http.php if the requested file does not exist
	location ~ ^/helpdesk/api/(tickets|tasks)(.*)$ {
		try_files $uri $uri/ /helpdesk/api/http.php;
	}

	# /scp/ajax.php needs PATH_INFO too, possibly more files need it hence the .*\.php
	if ($request_uri ~ "^/helpdesk/scp/.*\.php(/[^\?]+)") {
		set $path_info $1;
	}
	if ($request_uri ~ "^/helpdesk/.*\.php(/[^\?]+)") {
		set $path_info $1;
	}
    
		fastcgi_param  PATH_INFO    $path_info;

	# Make sure requests to /scp/ajax.php/some/path get handled by ajax.php
	location ~ ^/helpdesk/scp/ajax.php/(.*)$ {
		try_files $uri $uri/ /helpdesk/scp/ajax.php;
	}
    
	# Make sure requests to /ajax.php/some/path get handled by ajax.php
	location ~ ^/helpdesk/ajax.php/(.*)$ {
		try_files $uri $uri/ /helpdesk/ajax.php;
	}

 

 

Subscribe to my newsletter


What are your thoughts?

All comments are moderated and must adhere to the terms of service.

You might enjoy these similar articles:

Subscribe to my newsletter!