VPS & Nginx
Install FoxDesk on a VPS with Nginx reverse proxy. Complete server setup guide for Ubuntu/Debian with SSL and production configuration.
Nginx and PHP-FPM
The Nginx server block must pass the Authorization header to PHP-FPM and deny direct access to internal directories.
Nginx Configuration (Server Block)
In your virtual host configuration block (for example, /etc/nginx/sites-available/helpdesk.conf), include the following structure to handle the front-controller pattern and secure internal paths:
server {
listen 443 ssl;
server_name helpdesk.example.com;
root /var/www/helpdesk;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# These deny rules must appear before the generic PHP regex.
location ~ ^/(backups|bin|includes|storage|uploads)(?:/|$) {
deny all;
}
location ~ ^/(config(?:\.example)?\.php|version\.json|\.maintenance)$ {
deny all;
}
location ~ \.php$ {
try_files $fastcgi_script_name =404;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_AUTHORIZATION $http_authorization;
include fastcgi_params;
}
}
Adjust the PHP-FPM socket and filesystem path for the installed PHP version.
The try_files check prevents Nginx from passing a nonexistent script to
PHP-FPM. Keep the deny rules before the generic PHP regex so internal data and
configuration cannot match the PHP handler first.
Run nginx -t before reloading Nginx, then open install.php in a browser.
Do not create config.php before the fresh-install wizard; it creates that file
after validating the database.