On 2015-06-30 21:58, Benoît Minisini wrote:
> Le 30/06/2015 21:42, wi...@develop.earthshipeurope.org a écrit :
>> Hi all,
>> 
>> I have been studying the SmallWiki example to get some understanding 
>> of
>> how webpages work.
>> It all runs fine from IDE.
>> 
>> I have set up a small testing environment (Debian server) on a 
>> different
>> system.
>> I set up lighttpd (just did a default install of it, no extra
>> configuration done).
>> 
>> My questions:
>> 
>> 1. Can I simply make a .deb package from SmallWiki to install on 
>> testing
>> environment?
>> I guess I can, but what I really mean is where do the files 
>> (*.webpages
>> and such) end up after installation in case of installing such a 
>> Gambas
>> webpage project? I guess that is important if you want to host them 
>> from
>> a webserver.
>> 
>> 2. What exactly do I need to configure in lighttpd to host the 
>> installed
>> Gambas webpages?
>> An example configuration would be nice, as the general answer of need 
>> to
>> configure for cgi is too general for me. Not a website specialist
>> here...
>> 
>> Thanks,
>> 
>> gbWilly
>> 
> 
> You make an executable of the SmallWiki project. Then you install the
> resulting SmallWiki.gambas file as a CGI script in your web server.
> That's all. Just one file to copy and your web server to configure.
> 
> Regards,

Thanks Benoît,

I placed the SmallWiki.gambas in /var/www/Wiki.

Next, I adjusted the lighttpd.conf (/etc/lighttpd/lighttpd.conf).

For those who struggle with configuring lighttpd for Gambas webpages 
this is what I did in my lighttpd.conf file on test server to host 
SmallWiki.gambas:
-----------------------------------------------------------------
# "mod_cgi" added to server.modules below to make Gambas webpages work

server.modules = (
        "mod_access",
        "mod_alias",
        "mod_compress",
        "mod_redirect",
        "mod_cgi" ,
)

server.document-root        = "/var/www"
server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
server.errorlog             = "/var/log/lighttpd/error.log"
server.pid-file             = "/var/run/lighttpd.pid"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80

# Added 3 lines below to make Wiki folder a cgi-bin folder and let 
.gambas be run with gbr3
# Make sure you installed gambas3-scripter

$HTTP["url"] =~ "/Wiki/" {
       cgi.assign = ( ".gambas" => "/usr/bin/gbr3" )
}

index-file.names            = ( "index.php", "index.html", 
"index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".gambas" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", 
"text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
-----------------------------------------------------------------
Next, I opened a browser on the test system and typed:
http://localhost/Wiki/SmallWiki.gambas
and there was the SmallWiki.

gbWilly



------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to