1
Fork 0
blog/_posts/2011-09-27-running-etherpad-lite-on-nginx.md
2018-01-01 12:00:33 -07:00

2.9 KiB

extends: post.liquid title: running etherpad-lite on nginx date: 27 Sep 2011 21:24:00 +0200 path: /:year/:month/:day/running-etherpad-lite-on-nginx route: blog

As you should already know if you read this blog, I am using nginx as my main http server as well as a reverse proxy for my apps running on node.js or simple ruby.

I'm also running an etherpad-lite server on pad.fnordig.de.

Today @dasjan asked me how I configured my server for this setup:

@badboy_ Sehe gerade du hast dein etherpad-lite hinter nginx. Hast du etwas spezielles konfiguriert? (tweet) translated: @badboy_ I saw that you run your etherpad-lite behind a nginx. Did you configure anything special?

and

@badboy_ Bekomme hier nach ein paar Stunden immer Connection Probleme wenn etherpad-lite hinter nginx läuft/ translated: @badboy_ I always get connection problems after some hours when running behind nginx (tweet)

Even though I did nothing special I post my config here, so maybe this will help.

I currently use nginx v1.0.6 and etherpad-lite at 7e4bba0e with the default config (and node.js v0.4.8) etherpad runs as an own user named etherpad and is monitored by monit.

The monitoring is as simple as that, /etc/monit/apps/etherpad.monit:

check process etherpad
  with pidfile /var/run/etherpad-lite.pid
  start program = "/home/etherpad/etherpad-lite/daemon.sh start"
  stop program = "/home/etherpad/etherpad-lite/daemon.sh stop"
  if totalmem is greater than 300 MB for 10 cycles then restart  # eating up memory?

{:lang="text"}

And the nginx is nothing fancy at all, /usr/local/nginx/conf/vhosts/pad.fnordig.de.conf:

server {
    listen  80;
    listen  [::]:80;
    listen  443 ssl;
    ssl_certificate      /var/certs/star_fnordig_signed.pem;
    ssl_certificate_key  /var/certs/star_fnordig_signed.pem;

    server_name  pad.fnordig.de;

    access_log  /home/etherpad/etherpad-lite-log/eplite.access.log;
    error_log   /home/etherpad/etherpad-lite-log/eplite.error.log;

    location / {
        proxy_pass             http://localhost:9001/;
        proxy_set_header       Host $host;
        proxy_buffering off;
    }
}

{:lang="text"}

My etherpad is currently running for about 22 days without any problems. I don't really use it myself and have no current statistics on outside usage of pad.fnordig.de.

Now that @dasjan has mentioned problems on his side I will optimize my monitoring and see if it really runs as smooth as I think.