Not certain if this old tread was completely resolved or not
Kindly follow the following steps to run your compiled Gambas web application under Apache2 Web server
Install Apache21. Check Apache is installed
$ apache2 -v
2. Else install acahe2
$ sudo apt-get install apache2
3. $ sudo mkdir /var/www/gbCGI
4. $ sudo xed /etc/apache2/apache2.conf
Add following into above file
# --------- added by UZI -------------------------
ServerName localhost
ScriptAlias /gbCGI/ /var/www/gbCGI/
Options +ExecCGI
AddHandler cgi-script .cgi .pl .py .gambas
<Directory "/var/www/gbCGI">
AllowOverride None
Options +Indexes
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
# ------------------------------------------------
Gambas Test Project • Create a sample test Gambas Web project .. it could something as simple as print "Hi there"
• Check its functioning within local webserver by compiling and running it
• Copy the myGbWebApp.gambas file into /gbGI directoiry (as above at step 3 )
• Give it execute permissions chmod +x myGbWebApp.gambas
• It should show now in broswer
http://localhost/gbCGI/myGbWebApp.gambas • Even if myGbWebApp.gambas is renamed to a.cgi – it works !! works even without any extension .. perhaps the #! is embedded within Gambas executable file
5. Try checking the hosted files in browser, it may spit out text as it is i.e the CGI module did not have a symbolic link there: The CGI module was not enabled by default.
6. $ cd /etc/apache2/mods-enabled
7. $ sudo ln -s ../mods-available/cgi.load
8. Reload Apache configuration $ sudo service apache2 reload
Now you are ready to host big web applications too !!