Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| procedures:osticket [2026/07/03 09:27] – mattia.stalio | procedures:osticket [2026/07/03 10:54] (current) – mattia.stalio | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== OsTicket Install ====== | + | ====== OsTicket Install/ |
| This part is for installing the v1.10 of the osTicket software which is the one that is live at the moment of the writing of this Wiki. | This part is for installing the v1.10 of the osTicket software which is the one that is live at the moment of the writing of this Wiki. | ||
| Line 14: | Line 14: | ||
| ===Apche and MariaDB=== | ===Apche and MariaDB=== | ||
| < | < | ||
| + | Now do the mariadb secure installation | ||
| + | < | ||
| + | And to finish the mariadb config add these lines in / | ||
| + | < | ||
| + | bind-address=0.0.0.0</ | ||
| ===Php5.6 and necessary extension=== | ===Php5.6 and necessary extension=== | ||
| < | < | ||
| Line 27: | Line 32: | ||
| CREATE USER ' | CREATE USER ' | ||
| GRANT ALL PRIVILEGES ON osticket_db.* TO ' | GRANT ALL PRIVILEGES ON osticket_db.* TO ' | ||
| + | CREATE USER ' | ||
| + | GRANT ALL PRIVILEGES ON osticket_db.* TO ' | ||
| FLUSH PRIVILEGES; | FLUSH PRIVILEGES; | ||
| EXIT;</ | EXIT;</ | ||
| Line 96: | Line 103: | ||
| ===Make sure the config file is only readble=== | ===Make sure the config file is only readble=== | ||
| < | < | ||
| + | |||
| + | |||
| + | ======Nginx migration====== | ||
| + | Now the migration from apache2 to nginx | ||
| + | ====1.Nginx Install==== | ||
| + | < | ||
| + | sudo apt install nginx -y</ | ||
| + | ====2.Stop Apache2==== | ||
| + | < | ||
| + | sudo systemctl disable apache2</ | ||
| + | ====3.Configure PHP-FPM for nginx==== | ||
| + | < | ||
| + | ====4.Create Nginx config file==== | ||
| + | ===Remove the nginx default link=== | ||
| + | < | ||
| + | ===Create a new config file=== | ||
| + | < | ||
| + | < | ||
| + | listen 80; | ||
| + | server_name your_URL_or_IP; | ||
| + | root / | ||
| + | index index.php index.html index.htm; | ||
| + | |||
| + | access_log / | ||
| + | error_log / | ||
| + | |||
| + | location ~ ^/ | ||
| + | deny all; | ||
| + | return 403; | ||
| + | } | ||
| + | |||
| + | location /osticket/ { | ||
| + | try_files $uri $uri/ / | ||
| + | } | ||
| + | location ~ ^/ | ||
| + | try_files $uri $uri/ @osticket-api; | ||
| + | } | ||
| + | |||
| + | location @osticket-api { | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | } | ||
| + | |||
| + | location ~ \.php$ { | ||
| + | include snippets/ | ||
| + | fastcgi_pass unix:/ | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | include fastcgi_params; | ||
| + | |||
| + | fastcgi_read_timeout 300; | ||
| + | } | ||
| + | |||
| + | location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { | ||
| + | expires 30d; | ||
| + | } | ||
| + | |||
| + | location ~ /\. { | ||
| + | deny all; | ||
| + | } | ||
| + | }</ | ||
| + | ====5.Activate the website and Nginx==== | ||
| + | ===Enable the website=== | ||
| + | < | ||
| + | ===Test the config and start Nginx=== | ||
| + | < | ||
| + | If the result is positive then start nginx | ||
| + | < | ||
| + | ====6.Final permissions checks==== | ||
| + | < | ||
| + | sudo chmod -R 755 / | ||
| + | ====7.Https certificate==== | ||
| + | ===Install certbot=== | ||
| + | < | ||
| + | ===Use certbot=== | ||
| + | After you run this command follow the instructions | ||
| + | < | ||
| + | ===Update the Nginx configuration file=== | ||
| + | < | ||
| + | server_name your_URL_or_IP; | ||
| + | |||
| + | root / | ||
| + | index index.php index.html index.htm; | ||
| + | |||
| + | access_log / | ||
| + | error_log / | ||
| + | |||
| + | location ~ ^/ | ||
| + | deny all; | ||
| + | return 403; | ||
| + | } | ||
| + | |||
| + | location /osticket/ { | ||
| + | try_files $uri $uri/ / | ||
| + | } | ||
| + | location ~ ^/ | ||
| + | try_files $uri $uri/ @osticket-api; | ||
| + | } | ||
| + | |||
| + | location @osticket-api { | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | } | ||
| + | |||
| + | location ~ \.php$ { | ||
| + | include snippets/ | ||
| + | fastcgi_pass unix:/ | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | include fastcgi_params; | ||
| + | |||
| + | fastcgi_read_timeout 300; | ||
| + | } | ||
| + | |||
| + | location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { | ||
| + | expires 30d; | ||
| + | } | ||
| + | |||
| + | location ~ /\. { | ||
| + | deny all; | ||
| + | } | ||
| + | |||
| + | listen 443 ssl; # managed by Certbot | ||
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| + | include / | ||
| + | ssl_dhparam / | ||
| + | |||
| + | } | ||
| + | server { | ||
| + | #if ($host = your_URL) { | ||
| + | # return 301 https:// | ||
| + | #} # managed by Certbot | ||
| + | |||
| + | |||
| + | listen 80; | ||
| + | server_name your_URL your_IP; | ||
| + | return 301 http:// | ||
| + | }</ | ||
| + | Restart nginx | ||
| + | < | ||