I’m using a Debian 13 on Proxmox, i allready installed Apache2.

Starting from the Proxmox Shell going to the Debian LXC with PCT enter …. so SUDO is not needed.

To install full IDE you need “apt install gambas3” only web components “apt install gambas3-gb-util-web”.

Enabling CGI on Apache:
a2enmod cg

We need to add a handler for cgi:
nano /etc/apache2/conf-available/serve-cgi-bin.conf

<Directory “/usr/lib/cgi-bin”>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi .pl .gbs
Require all granted
</Directory>

Add the line AddHandler to the configuration file.

Enable the configuration:
a2enconf serve-cgi-bin

We upload the compilled File with all depending files and folder to:

/usr/lib/cgi-bin/

The cgi file needs a CHMOD 755 – executable…

We restart apache2
systemctl restart apache2

Check the error log if all is ok:
tail -20 /var/log/apache2/error.log

In the Gambas IDE on the Compilation options put: “mv $(FILE) $(FILE).cgi” so the output will be renamed to cgi.