Browse Source

initial commit

mxmehl 3 years ago
commit
e4c87a11b4
4 changed files with 38 additions and 0 deletions
  1. 3
    0
      .gitignore
  2. 1
    0
      build-single.sh
  3. 20
    0
      create-mime.assign.pl
  4. 14
    0
      lighttpd-fsfe.conf

+ 3
- 0
.gitignore View File

@@ -0,0 +1,3 @@
1
+config.cfg
2
+status/*
3
+fsfe.org/*

+ 1
- 0
build-single.sh View File

@@ -0,0 +1 @@
1
+/home/max/Dokumente/Selfcoded/build-single.sh

+ 20
- 0
create-mime.assign.pl View File

@@ -0,0 +1,20 @@
1
+#!/usr/bin/perl -w
2
+use strict;
3
+open MIMETYPES, "/etc/mime.types" or exit;
4
+print "mimetype.assign = (\n";
5
+my %extensions;
6
+while(<MIMETYPES>) {
7
+  chomp;
8
+  s/\#.*//;
9
+  next if /^\w*$/;
10
+  if(/^([a-z0-9\/+-.]+)\s+((?:[a-z0-9.+-]+[ ]?)+)$/) {
11
+    foreach(split / /, $2) {
12
+      # mime.types can have same extension for different
13
+      # mime types
14
+      next if $extensions{$_};
15
+      $extensions{$_} = 1;
16
+      print "\".$_\" => \"$1\",\n";
17
+    }
18
+  }
19
+}
20
+print ")\n";

+ 14
- 0
lighttpd-fsfe.conf View File

@@ -0,0 +1,14 @@
1
+server.modules = ( "mod_access" )
2
+$HTTP["remoteip"] !~ "127.0.0.1" {
3
+  url.access-deny = ("")    # prevent hosting to the network
4
+}
5
+
6
+# change port and document-root accordingly
7
+server.port                     = 5080
8
+server.document-root            = "/home/max/subversion/fsfe/local-build/fsfe.org"
9
+server.errorlog                 = "/dev/stdout"
10
+server.dir-listing              = "enable"
11
+dir-listing.encoding            = "utf-8"
12
+index-file.names                = ("index.html", "index.en.html")
13
+
14
+include_shell "./create-mime.assign.pl"

Loading…
Cancel
Save