Trusted-CGI is a web-based system that allows you to write your own server-side scripts on your web server. With this tool, you can execute CGI scripts with the designated user interface, and the scripts' inputs are validated and filtered automatically. This tutorial will guide you through the installation of Trusted-CGI on Linux Mint.
Before proceeding with the installation process, ensure that your system meets the following requirements:
Open the terminal and update the package lists, if not done already, using the following command:
sudo apt update
Once the update is complete, install the necessary dependencies by running the following command:
sudo apt install php-fpm php-pdo php-json php-sqlite3
Clone the Trusted-CGI repository using Git. Type the following command in the terminal:
git clone https://github.com/reddec/trusted-cgi.git
Navigate to the cloned repository using cd
command:
cd trusted-cgi
Create a new configuration file config.yml
. To create it easily, you can copy the default configuration file:
cp config.dist.yml config.yml
Verify that config.yml.dist
has been copied to config.yml
:
ls
If it shows config.dist.yml
and config.yml
in the list, then it has been copied successfully.
Open the Nginx configuration file for the default server:
sudo nano /etc/nginx/sites-available/default
Inside the server { ... }
configuration block, add the following server block:
location /trusted-cgi {
alias /var/www/trusted-cgi/;
index index.php;
try_files $uri $uri/ /trusted-cgi/index.php?$query_string;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Save and Exit the file by pressing Ctrl + X
, followed by Y
and then Enter
.
Restart Nginx to apply the changes:
sudo service nginx restart
In your web browser, enter http://localhost/trusted-cgi/
to test.
If everything is set up correctly, then you should see the Trusted-CGI dashboard:
In this tutorial, you have learned how to install Trusted-CGI on Linux Mint. Trusted-CGI is a web-based system that allows you to write your own server-side scripts on your web server. This tool is incredibly useful for developers who need to create custom applications that require complex server-side processing.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!