{"id":1243,"date":"2026-10-28T17:54:43","date_gmt":"2026-10-28T17:54:43","guid":{"rendered":"https:\/\/www.kompatscher.biz\/?page_id=1243"},"modified":"2026-10-28T18:13:49","modified_gmt":"2026-10-28T18:13:49","slug":"apache2-run-gambas-scripts","status":"publish","type":"page","link":"https:\/\/www.kompatscher.biz\/?page_id=1243","title":{"rendered":"Apache2 &#8211; Run Gambas scripts"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I&#8217;m using a Debian 13 on Proxmox, i allready installed Apache2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Starting from the Proxmox Shell going to the Debian LXC with PCT enter &#8230;. so SUDO is not needed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To install full IDE you need &#8220;apt install gambas3&#8221; only web components &#8220;apt install gambas3-gb-util-web&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enabling CGI on Apache:<br>a2enmod cg<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We need to add a handler for cgi:<br>nano \/etc\/apache2\/conf-available\/serve-cgi-bin.conf<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&lt;Directory &#8220;\/usr\/lib\/cgi-bin&#8221;&gt;<\/strong> <br>         AllowOverride None <br>         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch <br>         <strong>AddHandler cgi-script .cgi .pl .gbs <\/strong><br>         Require all granted <br><strong>&lt;\/Directory&gt;<\/strong> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the line AddHandler to the configuration file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enable the configuration:<br>a2enconf serve-cgi-bin<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We upload the compilled File with all depending files and folder to:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/usr\/lib\/cgi-bin\/<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The cgi file needs a CHMOD 755 &#8211; executable&#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We restart apache2<br>systemctl restart apache2<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the error log if all is ok:<br>tail -20 \/var\/log\/apache2\/error.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Gambas IDE on the Compilation options put: &#8220;mv $(FILE) $(FILE).cgi&#8221; so the output will be renamed to cgi.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m using a Debian 13 on Proxmox, i allready installed Apache2. Starting from the Proxmox Shell going to the Debian LXC with PCT enter &#8230;. so SUDO is not needed.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1243","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=\/wp\/v2\/pages\/1243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1243"}],"version-history":[{"count":3,"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=\/wp\/v2\/pages\/1243\/revisions"}],"predecessor-version":[{"id":1247,"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=\/wp\/v2\/pages\/1243\/revisions\/1247"}],"wp:attachment":[{"href":"https:\/\/www.kompatscher.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}