I use NGINX and it works fine. I did not use the config from the nginx site though. I have osTicket running in a vhost using FastCGI running through a socket.
Maybe this will help - use the logging features they will help.
Dan
This is my nginx.conf file:
user www-data www-data; worker_processes 2; pid /var/run/nginx.pid;
http { include /etc/nginx/mime.types; access_log /var/log/nginx/http.access.log; error_log /var/log/nginx/http.error.log; sendfile on; tcp_nopush on; keepalive_timeout 65; tcp_nodelay on; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; gzip on; gzip_disable \"MSIE [1-6]\.(?!.*SV1)\"; #SSL support # ssl_certificate /etc/nginx/SSL/ssl-unified.crt; # ssl_certificate_key /etc/nginx/SSL/ssl.key; #this is where the VHOSTS are loaded include /etc/nginx/sites-enabled/\"my vhostname\";
This is my NGINX virtual host entry:
server { server_name \"FQDNhostname\"; listen FQDNhostname:80; # listen 443; #https not using https during the test # ssl on; #turn on SSL support
root /var/www/\"MYWEBSITEname\"; index index.php index.html index.htm;
#static file 404's aren't logged and expires header is set to maximum age location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ { access_log off; expires max; }
# if the next line in yours still contains $document_root # consider switching to $request_filename provides # better support for directives such as alias fastcgi_param SCRIPT_FILENAME $request_filename;
maybe it's a bit late to answer now, but i've gotten the same problem.
After some searching, i've found the following patch to fix some nginx issues with osticket (when ajax is active or using the api), which fixes the problem for me:
Also maybe too late, but I had the same "undefined400" problem on the user side of osTicket in 1.9.5.1 and 1.9.6 - after reading all the forum threads, this seemed to be the best one in which to reply.
Here's the nginx incantations that worked for me:
# Requests to /api/* need their PATH_INFO set.
if ($request_uri ~ "^/api(/[^\?]+)") {
set $path_info $1;
}
# /api/*.* should be handled by /api/http.php if the requested file does not exist
location ~ ^/api/(?:tickets|tasks).*$ {
try_files $uri $uri/ /api/http.php?$query_string;
}
# ajax.php needs PATH_INFO too (possibly more files need it hence the .*\.php)
if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
set $path_info $1;
}
if ($request_uri ~ "^/.*\.php(/[^\?]+)") {
set $path_info $1;
}
# Make sure requests to ajax.php/some/path get handled
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_split_path_info ^(.+\.php)(/.+)$;
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
Note that setting PATH_INFO for the user-side /ajax.php was what finally did the trick.
I attempted to setup OSTicket 1.9.12 on new CentOS 7 install running Ajenti Control Panel. I have looked through all of the previously posted configurations and nothing seems to work.
I can install OSTicket, login without an issue, but I get a ton of Ajax request issues with 404 Not found errors. Specifically relating to /scp/ajax.php/config/scp, I know this has to do with dynamic rewrites.
If I use any of the above code Ajenti gives me errors starting Ngnix. I am not sure if I just need to figure out how to adapt the provided fixes to work with Ajenti but any help/insight someone can provide would be great.
I'm newby using nginx , I've always used Apache, and it's difficult to me to configure the nginx.conf with osticket. I've istalled Winginx package, I've modificate my nginx.conf (as attached below) in the way to acces to "scp/index.php" . I've put an echo test to be sure that the location goes to scp/index.php. I have the "test" message displayed but not images or login form. anyone could help me with this please.
Comments
Maybe this will help - use the logging features they will help.
Dan
This is my nginx.conf file:
This is my NGINX virtual host entry:
Here it its my config file.
Additional information
Server Oracle-Linux 6.4
PHP 5.3.3
I run all my applications in seperate "locations". They live in seperate directories under /var/www/websitename/
I noticed my fastcgi config has this entry:
Does running phpinfo in a file work?
Once I got Nginx working I kept all the static fastcgi directives in a seperate file and just use
in my vhost configs resulting in much smaller config files.
These are my fastcgi params:
maybe it's a bit late to answer now, but i've gotten the same problem.
After some searching, i've found the following patch to fix some nginx issues with osticket (when ajax is active or using the api), which fixes the problem for me:
https://github.com/osTicket/osTicket-1.7/issues/538#issuecomment-16049117
Hope this helps.
https://github.com/osTicket/osTicket-1.8/issues?utf8=✓&q=is:issue+is:open+nginx
These two seem more pertinent.
https://github.com/osTicket/osTicket-1.8/issues/2467
https://github.com/osTicket/osTicket-1.8/issues/382
Also if your running CentOS disable SELinux and see if that helps any. If it does then you would want to write rules for your implementation.
I'm newby using nginx , I've always used Apache, and it's difficult to me to configure the nginx.conf with osticket.
I've istalled Winginx package, I've modificate my nginx.conf (as attached below) in the way to acces to "scp/index.php" . I've put an echo test to be sure that the location goes to scp/index.php. I have the "test" message displayed but not images or login form. anyone could help me with this please.