Browse Source

updated tntnet config file

Format of configuration has changed to xml

Signed-off-by: Joerg Seitter <adk@seitter.net>
Joerg Seitter 10 years ago
parent
commit
393749a40b
3 changed files with 50 additions and 50 deletions
  1. 1 1
      package/tntnet/Makefile
  2. 0 49
      package/tntnet/files/tntnet.conf
  3. 49 0
      package/tntnet/files/tntnet.xml

+ 1 - 1
package/tntnet/Makefile

@@ -54,7 +54,7 @@ tntnet-install:
 	${INSTALL_DIR} ${IDIR_TNTNET}/etc/tntnet
 	${INSTALL_DIR} ${IDIR_TNTNET}/usr/bin
 	${INSTALL_DIR} ${IDIR_TNTNET}/usr/lib/tntnet
-	${INSTALL_DATA} ./files/tntnet.{conf,properties} \
+	${INSTALL_DATA} ./files/tntnet.{xml,properties} \
 		${IDIR_TNTNET}/etc/tntnet
 	${INSTALL_DATA} ./files/mime.conf \
 		${IDIR_TNTNET}/etc/tntnet

+ 0 - 49
package/tntnet/files/tntnet.conf

@@ -1,49 +0,0 @@
-# tntnet.conf
-
-PropertyFile	/etc/tntnet/tntnet.properties
-Listen	    0.0.0.0 80
-#SslListen  0.0.0.0 443 /etc/tntnet/tntnet.pem
-
-Daemon	    1
-User	    tntnet
-Group	    tntnet
-CompPath    /usr/lib/tntnet
-
-# set some limit to prevent DoS-attacks
-MaxRequestSize     1048576  # 1 MB
-
-#Dir                /
-#Chroot             /var/safedir
-PidFile            /var/run/tntnet.pid
-MinThreads         2
-MaxThreads         4
-#ThreadStartDelay   0  # in ms
-#QueueSize          100
-#CompPath           path
-#Load               webapp  # preload webapplication
-#BufferSize         16384
-#SocketReadTimeout  200
-#SocketWriteTimeout 10000
-#KeepAliveTimeout   15000
-#KeepAliveMax       100
-#SessionTimeout     300
-#CompLifetime       10
-#MaxRequestTime     600
-#ReportStateTime    1200
-
-#include /etc/tntnet.d/*.conf
-include /etc/tntnet/mime.conf
-
-# make demos callable
-#MapUrl  ^/demos/controls$            redirect@tntnet /demos/controls/
-#MapUrl  ^/demos/controls/(.+)\..*    $1@controls
-#MapUrl  ^/demos/controls/$           index@controls  index
-#MapUrl  ^/demos/controls/(.+)        index@controls  $1
-#MapUrl  ^/demos/(.+)\..*             $1@$1    $1
-#MapUrl  ^/demos/(.+)                 $1@$1
-#MapUrl  ^/demos/tntnet.jpg           tntnet@hello
-
-# configure tntnet as a simple webserver
-DocumentRoot /www
-MapUrl  (.*)/$  static@tntnet /$1/index.html
-MapUrl  ^/(.*)$ static@tntnet /$1

+ 49 - 0
package/tntnet/files/tntnet.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tntnet>
+  <mappings>
+    <mapping>
+      <target>static@tntnet</target>
+      <url>(.*)/$</url>
+      <pathinfo>/$1/index.html</pathinfo>
+    </mapping>
+    <mapping>
+      <target>static@tntnet</target>
+      <url>^/(.*)$</url>
+      <pathinfo>/$1</pathinfo>
+    </mapping>
+  </mappings>
+
+  <listeners>
+    <listener>
+      <ip>0.0.0.0</ip>
+      <port>80</port>
+    </listener>
+  </listeners>
+
+  <daemon>1</daemon>
+  <user>tntnet</user>
+  <group>tntnet</group>
+  <maxRequestSize>1048576</maxRequestSize>
+  <pidFile>/var/run/tntnet.pid</pidFile>
+  <minThreads>2</minThreads>
+  <maxThreads>4</maxThreads>
+  <documentRoot>/www</documentRoot>
+  <compPath>
+    <entry>/usr/lib/tntnet</entry>
+  </compPath>
+  <logging>
+    <rootlogger>INFO</rootlogger>
+    <loggers>
+      <logger>
+        <category>tntnet</category>
+        <level>INFO</level>
+      </logger>
+    </loggers>
+    <!-- <file>tntnet.log</file> -->      <!--uncomment if you want to log to a file -->
+    <!-- <maxfilesize>1MB</maxfilesize> -->
+    <!-- <maxbackupindex>2</maxbackupindex> -->
+    <!-- <host>localhost:1234</host> --> <!--  # send log-messages with udp -->
+  </logging>
+
+  <include>/etc/tntnet/mime.conf</include>
+</tntnet>