Difference between revisions of "Etherpad"
| Line 6: | Line 6: | ||
*** Considering patching etherpad-lite to use ipv6 as well | *** Considering patching etherpad-lite to use ipv6 as well | ||
*** Use a reverse-proxy | *** Use a reverse-proxy | ||
| − | ** SSL was not working, patched /home/etherpadlite/etherpad-lite/node/server.js line 81 | + | ** SSL was not working, patched /home/etherpadlite/etherpad-lite/node/server.js line 81. |
| − | <syntaxhighlight lang=" | + | ** Here is the ugly patch, considering using a proxy |
| − | + | <syntaxhighlight lang="html"> | |
| − | + | diff --git a/node/server.js b/node/server.js | |
| − | + | index c5377d8..2416a71 100644 | |
| − | + | --- a/node/server.js | |
| − | + | +++ b/node/server.js | |
| + | @@ -68,7 +68,10 @@ exports.maxAge = settings.maxAge; | ||
| + | //set loglevel | ||
| + | log4js.setGlobalLogLevel(settings.loglevel); | ||
| + | |||
| + | -async.waterfall([ | ||
| + | +async.waterfall(startServer('0.0.0.0')); | ||
| + | +async.waterfall(startServer('2001:788:dead:beef::5')); | ||
| + | + | ||
| + | +function startServer(ipAddr){ return [ | ||
| + | //initalize the database | ||
| + | function (callback) | ||
| + | { | ||
| + | @@ -78,7 +81,11 @@ async.waterfall([ | ||
| + | function (callback) | ||
| + | { | ||
| + | //create server | ||
| + | - var app = express.createServer(); | ||
| + | + var options = { | ||
| + | + key: fs.readFileSync('/home/etherpadlite/etherpad-lite/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key'), | ||
| + | + cert: fs.readFileSync('/home/etherpadlite/etherpad-lite/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt'), | ||
| + | + } | ||
| + | + var app = express.createServer(options); | ||
| + | |||
| + | app.use(function (req, res, next) { | ||
| + | res.header("Server", serverName); | ||
| + | @@ -409,8 +416,8 @@ async.waterfall([ | ||
| + | }); | ||
| + | |||
| + | //let the server listen | ||
| + | - app.listen(settings.port, settings.ip); | ||
| + | - console.log("Server is listening at " + settings.ip + ":" + settings.port); | ||
| + | + app.listen(settings.port, ipAddr); | ||
| + | + console.log("Server is listening at " + ipAddr + ":" + settings.port); | ||
| + | |||
| + | var onShutdown = false; | ||
| + | var gracefulShutdown = function(err) | ||
| + | @@ -497,4 +504,6 @@ async.waterfall([ | ||
| + | |||
| + | callback(null); | ||
| + | } | ||
| + | -]); | ||
| + | +]; | ||
| + | +} | ||
| + | + | ||
| + | diff --git a/static/js/pad.js b/static/js/pad.js | ||
| + | index bda6895..4d2e4e9 100644 | ||
| + | --- a/static/js/pad.js | ||
| + | +++ b/static/js/pad.js | ||
| + | @@ -93,13 +93,13 @@ function getParams() | ||
| + | settings.LineNumbersDisabled = true; | ||
| + | } | ||
| + | } | ||
| + | - if(useMonospaceFont) | ||
| + | - { | ||
| + | - if(useMonospaceFont == "true") | ||
| + | - { | ||
| + | + //if(useMonospaceFont) | ||
| + | + //{ | ||
| + | + // if(useMonospaceFont == "true") | ||
| + | + // { | ||
| + | settings.useMonospaceFontGlobal = true; | ||
| + | - } | ||
| + | - } | ||
| + | + // } | ||
| + | + //} | ||
| + | if(userName) | ||
| + | { | ||
| + | // If the username is set as a parameter we should set a global value that we can call once we have initiated the pad. | ||
| + | diff --git a/static/pad.html b/static/pad.html | ||
| + | index 4c6d4d8..1318257 100644 | ||
| + | --- a/static/pad.html | ||
| + | +++ b/static/pad.html | ||
| + | @@ -1,7 +1,7 @@ | ||
| + | <!doctype html> | ||
| + | <html> | ||
| + | |||
| + | - <title>Etherpad Lite</title> | ||
| + | + <title>FIXME Etherpad Lite</title> | ||
| + | |||
| + | <meta charset="utf-8"> | ||
| + | <meta name="robots" content="noindex, nofollow"> | ||
| + | @@ -276,4 +276,4 @@ | ||
| + | }()); | ||
| + | </script> | ||
| + | |||
| + | -</html> | ||
| + | \ No newline at end of file | ||
| + | +</html> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 12:12, 14 March 2012
- Installed on Internal_Server
- Etherpad lite installed by hand in /home/etherpadlite and run by /etc/init.d/etherpad-lite
- http://foo.fixme.ch:9001/ or http://62.220.135.248:9001
- Modification of the file /home/etherpadlite/etherpad-lite/static/js/pad.js 96-102 so it's Monospace font by default (didn't find a better working way), editing static/custom/pad.js with pad.changeViewOption('useMonospaceFont', true); doesn't work.
- IPv6 doesn't work out of the box
- Considering patching etherpad-lite to use ipv6 as well
- Use a reverse-proxy
- SSL was not working, patched /home/etherpadlite/etherpad-lite/node/server.js line 81.
- Here is the ugly patch, considering using a proxy
Invalid language.
You need to specify a language like this: <source lang="html4strict">...</source>
Supported languages for syntax highlighting:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, c_winapi, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, cpp-winapi, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic
diff --git a/node/server.js b/node/server.js
index c5377d8..2416a71 100644
--- a/node/server.js
+++ b/node/server.js
@@ -68,7 +68,10 @@ exports.maxAge = settings.maxAge;
//set loglevel
log4js.setGlobalLogLevel(settings.loglevel);
-async.waterfall([
+async.waterfall(startServer('0.0.0.0'));
+async.waterfall(startServer('2001:788:dead:beef::5'));
+
+function startServer(ipAddr){ return [
//initalize the database
function (callback)
{
@@ -78,7 +81,11 @@ async.waterfall([
function (callback)
{
//create server
- var app = express.createServer();
+ var options = {
+ key: fs.readFileSync('/home/etherpadlite/etherpad-lite/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key'),
+ cert: fs.readFileSync('/home/etherpadlite/etherpad-lite/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt'),
+ }
+ var app = express.createServer(options);
app.use(function (req, res, next) {
res.header("Server", serverName);
@@ -409,8 +416,8 @@ async.waterfall([
});
//let the server listen
- app.listen(settings.port, settings.ip);
- console.log("Server is listening at " + settings.ip + ":" + settings.port);
+ app.listen(settings.port, ipAddr);
+ console.log("Server is listening at " + ipAddr + ":" + settings.port);
var onShutdown = false;
var gracefulShutdown = function(err)
@@ -497,4 +504,6 @@ async.waterfall([
callback(null);
}
-]);
+];
+}
+
diff --git a/static/js/pad.js b/static/js/pad.js
index bda6895..4d2e4e9 100644
--- a/static/js/pad.js
+++ b/static/js/pad.js
@@ -93,13 +93,13 @@ function getParams()
settings.LineNumbersDisabled = true;
}
}
- if(useMonospaceFont)
- {
- if(useMonospaceFont == "true")
- {
+ //if(useMonospaceFont)
+ //{
+ // if(useMonospaceFont == "true")
+ // {
settings.useMonospaceFontGlobal = true;
- }
- }
+ // }
+ //}
if(userName)
{
// If the username is set as a parameter we should set a global value that we can call once we have initiated the pad.
diff --git a/static/pad.html b/static/pad.html
index 4c6d4d8..1318257 100644
--- a/static/pad.html
+++ b/static/pad.html
@@ -1,7 +1,7 @@
<!doctype html>
<html>
- <title>Etherpad Lite</title>
+ <title>FIXME Etherpad Lite</title>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
@@ -276,4 +276,4 @@
}());
</script>
-</html>
\ No newline at end of file
+</html>