Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| howto:apache [2010/03/06 16:33] – digitalman | howto:apache [2018/03/01 12:21] (current) – old revision restored digital man | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Use Apache HTTP Server with Synchronet ====== | ====== Use Apache HTTP Server with Synchronet ====== | ||
| - | FIXME | + | The Apache HTTP Server (httpd) supports dynamic content via external executables called [[wp> |
| + | |||
| + | ===== MOD_PROXY ===== | ||
| + | Probably the best way to integrate Synchronet behind Apache is to [[http:// | ||
| + | |||
| + | ===== IIS ===== | ||
| + | [[http:// | ||
| + | |||
| + | ===== JSexec ===== | ||
| + | |||
| + | The easiest way to get dynamic Synchronet content (e.g. users, messages, files) served by the Apache HTTP Server is by using [[util: | ||
| + | |||
| + | ==== CGI JavaScript ==== | ||
| + | JavaScript code that generates dynamic CGI content must first send one or more headers, followed by a blank-line, followed by the actual content (e.g. HTML). | ||
| + | |||
| + | === Example === | ||
| + | |||
| + | As an example, the following generates a very basic one-line header (declaring the content to be plain-text), | ||
| + | |||
| + | <code javascript> | ||
| + | print(" | ||
| + | print(); | ||
| + | print(" | ||
| + | </ | ||
| + | |||
| + | :!: If the content is going to contain HTML, then you would want to declare the '' | ||
| + | |||
| + | ==== Unix Examples ==== | ||
| + | |||
| + | For example, to execute the '' | ||
| + | |||
| + | <file nodelist> | ||
| + | #!/bin/sh | ||
| + | exec / | ||
| + | </ | ||
| + | |||
| + | :!: Don't forget to make the file executable: '' | ||
| + | |||
| + | Now when a web client requests the URL '' | ||
| + | |||
| + | Another option is to embed the JavaScript code in the CGI executable file itself. As an example, creating the file '' | ||
| + | |||
| + | <file test.cgi> | ||
| + | # | ||
| + | print(" | ||
| + | print(); | ||
| + | print(" | ||
| + | </ | ||
| + | |||
| + | :!: Don't forget to make the file executable: '' | ||
| + | |||
| + | Now when a web client requests the URL '' | ||
| ===== See Also ===== | ===== See Also ===== | ||
| + | * [[custom: | ||
| * [[util: | * [[util: | ||
| * [[: | * [[: | ||
| + | |||
| + | {{tag> | ||