2 # my.gpodder.org configuration file for lighttpd
4 # This file is part of my.gpodder.org.
6 # my.gpodder.org is free software: you can redistribute it and/or modify it
7 # under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or (at your
9 # option) any later version.
11 # my.gpodder.org is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
14 # License for more details.
16 # You should have received a copy of the GNU Affero General Public License
17 # along with my.gpodder.org. If not, see <http://www.gnu.org/licenses/>.
21 # How to setup for lighttpd (on Debian):
22 # - Copy this file to /etc/lighttpd/
23 # - Edit var.mygpo_home and var.mygpo_domain below
24 # - Add the following line to /etc/lighttpd/lighttpd.conf:
25 # include "mygpo.lighttpd.conf"
27 # http://iamtgc.com/2007/07/04/django-on-lighttpd-with-fastcgi/
28 # http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/
31 var.mygpo_home = "/srv/mygpo"
32 var.mygpo_domain = "gpodder.net"
35 $SERVER["socket"] == ":443" {
37 ssl.pemfile = mygpo_home + "/ssl/mygpo.pem"
38 ssl.ca-file = mygpo_home + "/ssl/gd_bundle.crt"
41 $HTTP["host"] =~ "^(my\.gpodder\.org|(ipv6\.|ipv46\.)?gpodder\.net)" {
42 server.document-root = mygpo_home + "/htdocs",
43 server.errorlog = mygpo_home + "/logs/error.log",
44 accesslog.filename = mygpo_home + "/logs/access.log",
45 accesslog.format = "%h %V %u %t \"%r\" %>s %b %T \"%{Referer}i\" \"%{User-Agent}i\"",
47 setenv.add-environment = (
48 "PYTHON_EGG_CACHE" => "/tmp",
54 "bin-path" => mygpo_home + "/mygpo.fcgi",
55 "socket" => "/tmp/mygpo-" + mygpo_domain + ".sock",
56 "check-local" => "disable",
64 # Deprecated Hostnames
65 $HTTP["host"] =~ "(my\.gpodder\.org|www\.gpodder\.net)" {
67 # Redirect for all non-API requests
68 $HTTP["url"] !~ "/api/.*" {
70 "^/(.*)$" => "http://gpodder.net/$1"
75 "^(/api/.*)$" => "/mygpo.fcgi$1",
80 $HTTP["host"] =~ "(ipv6\.|ipv46\.)?gpodder\.net" {
82 "^(/media.*)$" => "$1",
83 "^/(favicon\.ico|favicon\.png|robots\.txt)$" => "/$1",
84 "^/(clientconfig\.json)$" => "/$1",
85 "^(/.*)$" => "/mygpo.fcgi$1",