mirror of
https://github.com/lxsang/ant-http
synced 2024-11-17 17:08:20 +01:00
120 lines
3.4 KiB
INI
120 lines
3.4 KiB
INI
[SERVER]
|
|
; plugin directory
|
|
plugins=/opt/www/lib/
|
|
; plugin extension
|
|
plugins_ext=.so
|
|
; SQLITE database path
|
|
database=/opt/www/database/
|
|
; tmp dir
|
|
tmpdir=/opt/www/tmp/
|
|
; max concurent connection
|
|
statistic_fifo=/opt/www/tmp/antd_stat
|
|
maxcon=200
|
|
; server backlocg
|
|
backlog=5000
|
|
; number of workers
|
|
workers = 4
|
|
; max upload file size in bytes
|
|
max_upload_size = 10000000
|
|
; 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
|
|
|
|
; enable compression
|
|
gzip_enable = 1
|
|
gzip_types = text\/.*,.*\/css,.*\/json,.*\/javascript
|
|
debug_enable = 1
|
|
; 0 to disable
|
|
|
|
; a configuration each port
|
|
|
|
[PORT:443]
|
|
htdocs=/opt/www/htdocs
|
|
; enable or disable 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><url>?<query>
|
|
; or
|
|
; ^([a-zA-Z][a-zA-Z0-9]*)\.[a-zA-Z0-9]+\..*$ = /<1><url>?<query><break>
|
|
; <break> prevents apply the rules below the current one when matched
|
|
; example of reverse proxy with the proxy plugin
|
|
; ^\/os\/+(.*)$ = http://localhost:80/os/router.lua?r=<1>&<query>
|
|
; Sytax: [regular expression on the original request]=[new request rule]
|
|
|
|
[PORT:80]
|
|
htdocs=/opt/www/htdocs
|
|
; enable specific plugin
|
|
plugins=lua,tunnel
|
|
; enable or disable SSL
|
|
ssl.enable=0
|
|
; ^\/os\/+(.*)$ = /proxy/http://localhost:443/test.html?<query>
|
|
; 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><url>?<query>
|
|
; Sytax: [regular expression on the original request]=[new request rule]
|
|
|
|
|
|
|
|
[MIMES]
|
|
image/bmp=bmp
|
|
image/jpeg=jpg,jpeg
|
|
text/css=css
|
|
text/markdown=md
|
|
text/csv=csv
|
|
application/pdf=pdf
|
|
image/gif=gif
|
|
text/html=html,htm,chtml
|
|
application/json=json
|
|
application/javascript=js
|
|
image/png=png
|
|
image/x-portable-pixmap=ppm
|
|
application/x-rar-compressed=rar
|
|
image/tiff=tiff
|
|
application/x-tar=tar
|
|
text/plain=txt
|
|
application/x-font-ttf=ttf
|
|
application/xhtml+xml=xhtml
|
|
application/xml=xml
|
|
application/zip=zip
|
|
image/svg+xml=svg
|
|
application/vnd.ms-fontobject=eot
|
|
application/x-font-woff=woff,woff2
|
|
application/x-font-otf=otf
|
|
audio/mpeg=mp3,mpeg
|
|
|
|
|
|
; Example of plugin configurations
|
|
[PLUGIN:php]
|
|
; theses configurations is understandable by the server
|
|
; the name of the plugin in plugin dir
|
|
name = fastcgi
|
|
; run this plugin at startup
|
|
autoload = true
|
|
; file handle
|
|
file_type = php,pp
|
|
;
|
|
; The following example configurations are application specific
|
|
; pluggin specific configurations here, for example
|
|
socket = /var/php.sock
|
|
bin = /usr/bin/phpfcgi
|
|
; etc |