NGINX
apt install nginx
rm /var/www/html/*nginx*.html
PHP
apt install php8.2 php8.2-{mysql,fpm,mbstring,xml,imap,zip,gd,curl}
php -v
php -m
MariaDB
apt install mariadb-server libmariadb-dev
Git
apt install git
For FPM we need to fix_pathinfo
echo "cgi.fix_pathinfo=0" >> /etc/php/8.0/fpm/php.ini
Run the secure installation
mysql_secure_installation
Create a new DB
CREATE DATABASE `freescout` CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
Create a new user with all privileges on the new DB
GRANT ALL PRIVILEGES ON `freescout`.* TO `freescout`@`localhost` IDENTIFIED BY "*************";
Create the directory where FreeScout will live
mkdir -p /var/www/freescout
cd /var/www/freescout
Download FreeScout from GitHub and change ownership
git clone https://github.com/freescout-helpdesk/freescout .
chown www-data:www-data /var/www/freescout
Disable the default site, create a new config and enable it
rm /etc/nginx/sites-enabled/default
touch /etc/nginx/sites-available/freescout
ln -s /etc/nginx/sites-available/freescout /etc/nginx/sites-enabled/freescout
vim /etc/nginx/sites-available/freescout
Use the following config
server {
listen 80;
server_name helpdesk.int.skeelstech.com;
root /var/www/freescout/public;
index index.php index.html index.htm;
error_log /var/www/freescout/storage/logs/web-server.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param HTTPS on; #<-- use this when behind a proxy
}
# Uncomment this location if you want to improve attachments downloading speed.
# Also make sure to set APP_DOWNLOAD_ATTACHMENTS_VIA=nginx in the .env file.
#location ^~ /storage/app/attachment/ {
# internal;
# alias /var/www/freescout/storage/app/attachment/;
#}
location ~* ^/storage/attachment/ {
expires 1M;
access_log off;
try_files $uri $uri/ /index.php?$query_string;
}
location ~* ^/(?:css|js)/.*\.(?:css|js)$ {
expires 2d;
access_log off;
add_header Cache-Control "public, must-revalidate";
}
location ~* ^/(?:css|fonts|img|installer|js|modules|[^\\\]+\..*)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
location ~ /\. {
deny all;
}
}
Validate the config and reload
nginx -t
systemctl restart nginx.service php8.2-fpm.service
Navigate to http://freescout.domain.com/install
Work through the install wizard.
Modify www-data
's cron jobs
crontab -u www-data -e
Add the following job to run every minute
* * * * * php /var/www/html/artisan schedule:run >> /dev/null 2>&1