Comments on How to Install osTicket with Nginx on Ubuntu 16.04

In this tutorial, I will show you step by step to install and configure osTicket on Ubuntu 16.04. OsTicket is an open source support ticket system based on PHP. It's a simple and lightweight support ticket system, designed to be easy to use and easy to install.

18 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Yael

I have an error, missing extensions, MySQLi extension for PHP and other 3 recommended.

I follow every step twice, Am I missing something with the php.ini configuration?

Regards

By: Brury

phpinfo is works

nginx is work

When in step 6, i i open the browser for http://osticket.hakase-labs.com but show your server is not found

can you help me

 

Thanks

 

By: Patrick

Same issue, all good steps 1-5, no errors to report until I get to step 6 and same result as Brury.Any suggestions or help?  Thanks in advance.

By: Guy

There's is a missing entry just before Step 6. Ngnix need to be restarted to reload config. Can also be a php module... anyway on my side I did a 'reboot -now' then all good after.

By: Mike

The install worked great, but the help info popups and if I want to delete a ticket are blank white boxes.

By: fernando

Osticket doesn't support nginx!

By: Bruce

To fix AJAX problems showing up as blank white boxes, the nginx osticket configuration needs specific settings.

In my nginx osticket configurations, I force mandatory TLS as passwords and confidential information are passing between clients and nginx osticket server.  With that said I followed this how to aricle on installing self-signed TLS certificate on my osticket server.

https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-16-04

 

Below is my nginx osticket configuration that fixes the AJAX blank white boxes.  Change the server name to your liking.

 

server {    server_name support.nscap.gov;    listen 80;    listen [::]:80;    return 301 https://$server_name$request_uri;}server {    # SSL configuration    server_name support.nscap.gov;    listen 443 ssl http2;    listen [::]:443 ssl http2;    include snippets/self-signed.conf;    include snippets/ssl-params.conf;    root /var/www/osticket/upload;    index index.php index.html index.htm;    set $path_info "";    # Deny access to all files in the include directory    location ~ ^/include {        deny all;        return 403;    }    # Deny access to apache .ht* files (nginx doesn't use these)    location ~ /\.ht {        deny all;    }    # Requests to /api/* need their PATH_INFO set, this does that    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;    }    # /scp/ajax.php needs PATH_INFO too, possibly more files need it hence the .*\.php    if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {        set $path_info $1;    }    # Make sure requests to /scp/ajax.php/some/path get handled by ajax.php    location ~ ^/scp/ajax.php/(.*)$ {        try_files $uri $uri/ /scp/ajax.php;    }    if ($request_uri ~ "^/ajax.php(/[^\?]+)") {        set $path_info $1;    }    location ~ ^/ajax.php/.*$ {        try_files $uri $uri/ /ajax.php;    }    location / {        index     index.php;        # try_files $uri $uri/ /index.php$is_args$args;    }    location ~ \.php$ {        try_files $uri =404;        # fastcgi_split_path_info ^(.+\.php)(/.+)$;        fastcgi_pass unix:/run/php/php7.0-fpm.sock;        fastcgi_index index.php;        include fastcgi_params;        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;        fastcgi_param SCRIPT_NAME $fastcgi_script_name;        fastcgi_param PATH_INFO $path_info;    }    location = /50x.html {        root /var/www/html;    }    error_page 404 /404.html;    error_page 500 502 503 504 /50x.html;}

Regards

By: Austin

I'm also having an ajax issue with the blank white bar showing up in place of the pop up.  I can't make sense of the formatting in this comment, does anything have a solution for this issue.

By: Oscar

Try to comment or delete the next line:

include snippets/fastcgi-php.conf;

Now its working ;=)

By: Kia

Thanks Oscar, you made my day. It is now working. Thanks a lot. 

By: Maniyeri

Thanks Oscar!

By: Kimberly

Thank you Oscar. You're my hero!!! :-) 

By: Travis

I used Bruce's script but omitted the SSL stuff and that fixed the issue for me.  Obviously the site won't use SSL if you decide to go this route.  My system is internal and I didn't want to pay for an SSL certificate or deal with browser warnings about using a self-signed one.

My scripts are as follows:

default:

server {    listen 80 default_server;        listen [::]:80 default_server;        #        # Note: You should disable gzip for SSL traffic.        # See: https://bugs.debian.org/773332        #        # Read up on ssl_ciphers to ensure a secure configuration.        # See: https://bugs.debian.org/765782        #        # Self signed certs generated by the ssl-cert package        # Don't use them in a production server!        #        # include snippets/snakeoil.conf;        root /var/www/html;        # Add index.php to the list if you are using PHP        index index.html index.htm index.nginx-debian.html;        server_name _;        location / {                # First attempt to serve request as file, then                # as directory, then fall back to displaying a 404.                try_files $uri $uri/ =404;        }        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000        #        location ~ \.php$ {                include snippets/fastcgi-php.conf;        #        #       # With php7.0-cgi alone:        #       fastcgi_pass 127.0.0.1:9000;        #       # With php7.0-fpm:                fastcgi_pass unix:/run/php/php7.0-fpm.sock;        }        # deny access to .htaccess files, if Apache's document root        # concurs with nginx's one        #        #location ~ /\.ht {        #       deny all;        #}}# Virtual Host configuration for example.com## You can move that to a different file under sites-available/ and symlink that# to sites-enabled/ to enable it.##server {#       listen 80;#       listen [::]:80;##       server_name example.com;##       root /var/www/example.com;#       index index.html;##       location / {#               try_files $uri $uri/ =404;#       }#}

osticket:

server {        server_name 10.39.0.110;        listen 80;        listen [::]:80;         root   /var/www/osticket/upload;         index index.php index.html index.htm;        set $path_info "";        # Deny access to all files in the include directory        location ~ ^/include {         deny all;        return 403;}        # Deny access to apache .ht* files (nginx doesn't use these)         location ~ /\.ht {         deny all;}        # Requests to /api/* need their PATH_INFO set, this does that        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;}        # /scp/ajax.php needs PATH_INFO too, possibly more files need it hence the .*\.php        if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {        set $path_info $1;}        # Make sure requests to /scp/ajax.php/some/path get handled by ajax.php        location ~ ^/scp/ajax.php/(.*)$ {        try_files $uri $uri/ /scp/ajax.php;}        if ($request_uri ~ "^/ajax.php(/[^\?]+)") {        set $path_info $1;}        location ~ ^/ajax.php/.*$ {        try_files $uri $uri/ /ajax.php;}        location / {        index     index.php;        # try_files $uri $uri/ /index.php$is_args$args;}        location ~ \.php$ {        try_files $uri =404;        # fastcgi_split_path_info ^(.+\.php)(/.+)$;        fastcgi_pass unix:/run/php/php7.0-fpm.sock;        fastcgi_index index.php;        include fastcgi_params;        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;        fastcgi_param SCRIPT_NAME $fastcgi_script_name;        fastcgi_param PATH_INFO $path_info;}        location = /50x.html {        root /var/www/html;}        error_page 404 /404.html;        error_page 500 502 503 504 /50x.html;}

Hope this helps!

By: Steffen Ruempel

Hello, thank you for this this exellent how-to. Installation is complete, my preferred löanguage is installed, but windows to create new departments for example or the help bubbles are empty. Is there an php parameter that I hav to configure ? Thanks for your help ! Regards, Steffen.

By: Travis

 Steffen, try using the Nginx scripts that I posted in my other comment (substituting in your web address or IP address of course).  I had the same issue and that solved it.  Unfortunately this website didn't recognize the new lines so it looks messy.  Any time there is a series of spaces it means a new line.

Lyes, http://osticket.hakase-labs.com is just an example address.  You need to substitute the web address or IP address of your server.

 

By: lyes

please help me  i have same problem

phpinfo is works

nginx is work

When in step 6, i i open the browser for http://osticket.hakase-labs.com but show your server is not found

can you help me

 

Thanks

By: rjtogy1966

I installing osticket in my httpd but my proxy is nginx and i not cant https.Thats website work fine in me httpd in adress 192.168.1.1:8080, but i not work in nginx.I need configuration to proxy nginx.

By: nanu

osticket zip file is not downloaded