diff --git a/antd-config.ini b/antd-config.ini index 6adadf5..eae38ed 100644 --- a/antd-config.ini +++ b/antd-config.ini @@ -1,18 +1,43 @@ [SERVER] +# DONOT edit following options plugins=./opt/www/lib/ plugins_ext=.so -database=/opt/www/database +# These options can be changed tmpdir=/tmp/ +database=./ maxcon=500 backlog=5000 workers = 4 max_upload_size = 20000000 gzip_enable = 1 gzip_types = text\/.*,.*\/css.*,.*\/json.*,.*\/javascript.* +debug_enable = 0 +# if SSL is enable on one port, one should specify +# the SSL cert and key files +# Example: self signed key +# openssl genrsa -des3 -passout pass:1234 -out keypair.key 2048 +# openssl rsa -passin pass:1234 -in keypair.key -out server.key +# openssl req -new -key server.key -out server.csr +# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt +# ssl.cert=/opt/www/server.crt +# ssl.key=/opt/www/server.key +# ssl.cipher=ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 [PORT:8888] +# DONOT edit this option htdocs=./opt/www/htdocs +# Edit this option to enable SSL ssl.enable=0 +; other config shoud be rules applied on this port +; For example the following rule will +; convert a request of type: +; name.example.com?rq=1 +;TO: +; example.com/name/?rq=1 +; this is helpful to redirect many sub domains +; to a sub folder of the same server +; ^([a-zA-Z][a-zA-Z0-9]*)\.[a-zA-Z0-9]+\..*$ = /<1>? +; Sytax: [regular expression on the original request]=[new request rule] ^/os/(.*)$ = /os/router.lua?r=<1>& @@ -44,8 +69,10 @@ application/x-font-otf=otf audio/mpeg=mp3,mpeg [FILEHANDLER] +# DONOT change options in this section lua = lua [AUTOSTART] +# DONOT change options in this section plugin = tunnel plugin = lua \ No newline at end of file diff --git a/mkimg.sh b/mkimg.sh index e1911dc..98713a2 100755 --- a/mkimg.sh +++ b/mkimg.sh @@ -52,7 +52,7 @@ cd $B [ ! -f "$W/antd-config.ini" ] && cp ./opt/www/antd-config.ini $W/antd-config.ini [ ! -f "$W/runner.ini" ] && cp ./opt/www/runner.ini $W/runner.ini export LD_LIBRARY_PATH="$B/usr/lib/" -echo "Runing Antd in $B" +echo "Runing Antd in $B with configuration $W/antd-config.ini" touch /tmp/.antos_pkgcache ./usr/bin/antd $W/antd-config.ini >/dev/null 2>&1 | ( sleep 2 && ./opt/www/bin/runner $W/runner.ini >/dev/null 2>&1 &) EOF diff --git a/runner.ini b/runner.ini index abdaf5a..7bba79b 100644 --- a/runner.ini +++ b/runner.ini @@ -1,4 +1,6 @@ [vterm] +# Do not change these 2 options exec = ./opt/www/bin/vterm param = /tmp/channels/antd_hotline.sock +# change this to enable debug debug = 0 \ No newline at end of file