Installazione software · 8 min read · Oct 20, 2025
Come installare osTicket con Nginx su Debian 11

osTicket è un sistema di ticket di supporto gratuito e open-source utilizzato per scalare e semplificare il servizio clienti e migliorare l’esperienza del cliente. Offre un’interfaccia web per gestire, organizzare e monitorare tutti i ticket di supporto. È scritto in PHP e supporta vari database come MySQL e PostgreSQL.
Caratteristiche
- Report del Dashboard
- Argomenti di aiuto configurabili
- Contratti di livello di servizio
- Filtri per ticket
- Portale di supporto clienti
- Risponditore automatico
Questo tutorial ti mostrerà come installare osTicket su Debian 11.
Requisiti
- Un server che esegue Debian 11.
- Un nome di dominio valido puntato all’IP del tuo server.
- Una password di root configurata sul server.
Iniziare
Per prima cosa, aggiorna e aggiorna tutti i pacchetti di sistema all’ultima versione utilizzando il seguente comando.
apt update -y
apt upgrade -yUna volta aggiornati tutti i pacchetti, puoi installare altri pacchetti richiesti con il seguente comando:
apt install ca-certificates apt-transport-https software-properties-common wget curlUna volta installati tutti i pacchetti richiesti, puoi procedere al passaggio successivo.
Installa Nginx e PHP
Per prima cosa, installa il pacchetto del server web Nginx utilizzando il seguente comando.
apt install nginx -ySuccessivamente, aggiungi il repository PHP utilizzando il seguente comando.
curl -sSL https://packages.sury.org/php/README.txt | bash -xSuccessivamente, installa l’ultima versione di PHP e altre dipendenze PHP richieste utilizzando il seguente comando.
apt install php8.1 php8.1-mysql php8.1-cgi php8.1-fpm php8.1-cli php8.1-curl php8.1-gd php8.1-imap php8.1-mbstring php8.1-intl php8.1-apcu php8.1-common php8.1-gettext php8.1-bcmath php8.1-xml php8.1-dom -yDopo l’installazione, modifica il file di configurazione PHP.
nano /etc/php/8.1/fpm/php.iniCambia la seguente riga.
cgi.fix_pathinfo=0
Salva e chiudi il file, quindi riavvia il servizio PHP-FPM per applicare le modifiche.
systemctl restart php8.1-fpmInstalla e configura MariaDB
Per prima cosa, installa il server di database MariaDB utilizzando il seguente comando.
apt install mariadb-server -ySuccessivamente, metti in sicurezza l’installazione di MariaDB con il seguente comando.
mysql_secure_installationRispondi a tutte le domande qui sotto:
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Successivamente, accedi alla shell di MariaDB come utente root.
mysql -u root -pSuccessivamente, crea un database e un utente per osTicket.
MariaDB [(none)]> create database osticketdb;
MariaDB [(none)]> grant all privileges on osticketdb.* to osticketuser identified by 'secure-password';Successivamente, svuota i privilegi ed esci dalla shell di MariaDB con il seguente comando.
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;Installa osTicket
Per prima cosa, scarica l’ultima versione di osTicket dalla pagina di download di GitHub.
wget https://github.com/osTicket/osTicket/releases/download/v1.17.2/osTicket-v1.17.2.zipUna volta completato il download, crea una directory per osTicket ed estrai il file scaricato all’interno di quella directory.
mkdir /var/www/html/osticket
unzip osTicket-v1.17.2.zip -d /var/www/html/osticketSuccessivamente, imposta la proprietà e i permessi sulla directory osticket.
chown -R www-data:www-data /var/www/html/osticket
chmod -R 755 /var/www/html/osticketSuccessivamente, rinomina il file di configurazione di esempio di osTicket.
mv /var/www/html/osticket/upload/include/ost-sampleconfig.php /var/www/html/osticket/upload/include/ost-config.phpUna volta terminato, puoi procedere al passaggio successivo.
Configura Nginx per osTicket
Successivamente, dovrai creare un file di configurazione del virtual host Nginx per osTicket. Puoi crearlo con il seguente comando.
nano /etc/nginx/conf.d/osticket.confAggiungi la seguente configurazione.
server {
listen 80;
server_name osticket.example.com;
root /var/www/html/osticket/upload;
index index.php index.html index.htm;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Abilita gzip
gzip on;
gzip_min_length 1000;
gzip_types text/plain application/x-javascript text/xml text/css application/xml;
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;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
}
Salva e chiudi il file, quindi verifica la configurazione di Nginx con il seguente comando.
ginx -tRiceverai il seguente output.
nginx: il file di configurazione /etc/nginx/nginx.conf ha una sintassi corretta
ginx: il file di configurazione /etc/nginx/nginx.conf è stato testato con successo
Successivamente, riavvia il servizio Nginx per applicare le modifiche.
systemctl restart nginxPuoi anche controllare lo stato di Nginx utilizzando il seguente comando.
systemctl status nginxDovresti vedere lo stato di Nginx nel seguente output.
? nginx.service - Un server web ad alte prestazioni e un server proxy inverso
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-12-21 08:15:10 UTC; 4s ago
Docs: man:nginx(8)
Process: 24700 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 24701 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 24702 (nginx)
Tasks: 2 (limit: 2339)
Memory: 3.1M
CPU: 25ms
CGroup: /system.slice/nginx.service
??24702 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
??24703 nginx: worker process
Dec 21 08:15:10 debian11 systemd[1]: nginx.service: Succeeded.
Dec 21 08:15:10 debian11 systemd[1]: Stopped Un server web ad alte prestazioni e un server proxy inverso.
Dec 21 08:15:10 debian11 systemd[1]: Starting Un server web ad alte prestazioni e un server proxy inverso...
Dec 21 08:15:10 debian11 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Dec 21 08:15:10 debian11 systemd[1]: Started Un server web ad alte prestazioni e un server proxy inverso.
A questo punto, Nginx è installato e configurato per osTicket. Puoi ora procedere ad accedere a osTicket.
Accedi all’interfaccia web di osTicket
Apri il tuo browser web e accedi alla pagina di installazione di osTicket utilizzando l’URL http://osticket.example.com. Dovresti vedere la pagina dei requisiti.

Clicca su Continua. Dovresti vedere la pagina di installazione di base.


Definisci l’URL del tuo helpdesk, nome, email, nome del database, nome utente, password, quindi clicca sul pulsante Installa ora per avviare l’installazione. Una volta installato osTicket, dovresti vedere la seguente pagina.

Per accedere al pannello di controllo di osTicket, digita l’URL http://osticket.example.com/scp nel tuo browser web. Dovresti vedere la pagina di accesso di osTicket.

Fornisci il tuo nome utente admin, password e clicca sul pulsante Login. Dovresti vedere il dashboard di osTicket nella schermata seguente.

Puoi anche accedere alla pagina del forum di osTicket utilizzando l’URL https://forum.osticket.com.

Abilita SSL su osTicket
Per installare il SSL Let’s Encrypt sul sito web di osTicket, dovrai installare il pacchetto certbot sul tuo server.
Per prima cosa, installa il gestore di pacchetti Snap con il seguente comando:
apt install snapdSuccessivamente, aggiorna il pacchetto Snap all’ultima versione:
snap install core
snap refresh coreSuccessivamente, installa il pacchetto certbot utilizzando il seguente comando:
snap install --classic certbotSuccessivamente, crea un collegamento simbolico per il binario Certbot nella posizione di sistema:
ln -s /snap/bin/certbot /usr/bin/certbotSuccessivamente, esegui il seguente comando per scaricare e installare i certificati SSL Let’s Encrypt:
certbot --nginx -d osticket.example.comTi verrà chiesto di fornire il tuo indirizzo email e accettare i termini di servizio:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Digita Y e premi il tasto Invio per scaricare e installare i certificati SSL per il tuo dominio:
Account registered.
Requesting a certificate for osticket.example.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/osticket.example.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/osticket.example.com/privkey.pem
This certificate expires on 2023-03-22.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for osticket.example.com to /etc/nginx/conf.d/osticket.conf
Congratulations! You have successfully enabled HTTPS on https://osticket.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Conclusione
Congratulazioni! hai installato con successo osTicket con Nginx su Debian 11. Puoi ora implementare osTicket nella tua azienda e usarlo come sistema di gestione helpdesk. Sentiti libero di chiedermi se hai domande.
Ricevi i nuovi post nella tua casella di posta.
Nessuno spam. Disiscriviti in qualsiasi momento.