|
ApacheConfiguration
Apache configuration for v8cgi
Apache configurationThere are three main ways of using v8cgi with Apache. After you manage to prepare the configuration, go on by trying serving some sample html. On windows, all necessary dlls must be available in system path! 1. Apache moduleThis is the preferred way. If you installed the libapache2-mod-v8cgi from v8cgi's PPA, just do sudo a2enmod v8cgi sudo /etc/init.d/apache2 restart and you are all set. Otherwise:
LoadModule v8cgi_module /path/to/the/v8cgi_module.so AddHandler v8cgi-script .ssjs .sjs v8cgi_Config /path/to/v8cgi.conf 2. CGI binary - traditional approachThis variant is not specific to v8cgi. Apache configured in this way will just execute all assigned files (.ssjs in the example below) and return output. AddHandler cgi-script .ssjs Note that .ssjs files have to be executable (chown +r) and they must contain a valid shebang line (#!/path/to/v8cgi). Windows users will find this approach problematic, as there is no way to execute arbitrary files with shebang on Windows. 3. CGI binary - centralized approachThis is the least preferred way. ScriptAlias /v8cgi/ /YOUR_PATH/ AddHandler v8cgi-handler .ssjs Action v8cgi-handler /v8cgi/BINARY_NAME while substituting:
|
Ondrej can I ask you where is the other page with comments and my window installation comment? I spent some time to write it and I did not expect an erased post, thanks.
Hi Andrea,
it is true that I recently removed several wikipages and merged them into other. Namely, "Running" and "Installation" pages are now gone. In fact, it never came to my mind that this process is irreversible, because wikipages are stored in SVN repository as well.
However, based on your email, I tried to undelete the Installation page and I was unpleasantly surprised by the fact that user comments were not part of that page. As a result, I am unfortunately unable to retrieve any user comments attached to deleted wiki pages.
I am very sorry about this, as I understand that some amount of your work is unrecoverable now. If you manage to write that stuff again, I would like to directly include it in the relevant wikipage (as opposed to simple comment): this way, it won't be lost if we decide to remove/merge the page.
Sorry again, Ondrej
Regarding Windows users finding the CGI Binary approach problematic: if they create a file association between .ssjs files and v8cgi in Windows Explorer, then the system will launch v8cgi and pass it the .ssjs file whenever Apache attempts to launch a .ssjs file.
The above conversations bring to mind that it's been a dozen years since anyone wrote a book on server-side JavaScript? (on Netscape servers). I would be delighted to proof-read drafts of a book on V8 JavaScript? servers. The likely target audience could be people like myself who wish to port their client-side skills to a web server.