|
|
|
# vim: set ft=yaml:
|
|
|
|
|
|
|
|
# when provide certficate file, server will listen https and enable http2
|
|
|
|
|
|
|
|
|
|
|
|
# http config
|
|
|
|
-
|
|
|
|
# listen address
|
|
|
|
host: 0.0.0.0
|
|
|
|
|
|
|
|
# listen port
|
|
|
|
port: 9001
|
|
|
|
|
|
|
|
# default document root
|
|
|
|
docroot: /srv/www
|
|
|
|
|
|
|
|
enableproxy: true
|
|
|
|
enableauth: true
|
|
|
|
passwdfile: ./passwdfile
|
|
|
|
realm: example.com
|
|
|
|
|
|
|
|
# default host's url rule
|
|
|
|
# urlrules:
|
|
|
|
# -
|
|
|
|
# urlprefix: /a
|
|
|
|
# type: alias
|
|
|
|
# target:
|
|
|
|
# type: dir
|
|
|
|
# path: /home/user1/a
|
|
|
|
# -
|
|
|
|
# urlprefix: /b/a.txt
|
|
|
|
# type: alias
|
|
|
|
# target:
|
|
|
|
# type: file
|
|
|
|
# path: /home/user1/a/b/a.txt
|
|
|
|
|
|
|
|
# virtual host config
|
|
|
|
# vhost:
|
|
|
|
# - &example1_www
|
|
|
|
# hostname: www.example1.com
|
|
|
|
# docroot: /var/www/html/
|
|
|
|
# # cert:
|
|
|
|
# # key:
|
|
|
|
#
|
|
|
|
# # url rule for www.example.com
|
|
|
|
# urlrules:
|
|
|
|
# -
|
|
|
|
# # url start with /APIv1/ forward to uwsg socket
|
|
|
|
# urlprefix: /APIv1/
|
|
|
|
# type: uwsgi
|
|
|
|
# target:
|
|
|
|
# type: unix
|
|
|
|
# path: /run/uwsgi/APIv1.sock
|
|
|
|
# -
|
|
|
|
# # run php script on /phpmyadmin/ subdirectory
|
|
|
|
# urlprefix: /phpmyadmin/
|
|
|
|
# type: fastcgi
|
|
|
|
# target:
|
|
|
|
# type: unix
|
|
|
|
# path: /var/run/php-fpm/www.sock
|
|
|
|
# -
|
|
|
|
# # pass php to fastcgi socket
|
|
|
|
# urlprefix: \.php$|\.php/.*
|
|
|
|
# isregex: true
|
|
|
|
# type: fastcgi
|
|
|
|
# target:
|
|
|
|
# type: unix
|
|
|
|
# path: /var/run/php-fpm/www.sock
|
|
|
|
# -
|
|
|
|
# # run php script on other location
|
|
|
|
# urlprefix: /a/
|
|
|
|
# docroot: /home/user/php
|
|
|
|
# type: fastcgi
|
|
|
|
# target:
|
|
|
|
# type: unix
|
|
|
|
# path: /var/run/php-fpm/www.sock
|
|
|
|
# -
|
|
|
|
# # url start with /proxy/ reverse proxy for http://10.10.1.1/
|
|
|
|
# # this act as reverse proxy
|
|
|
|
# urlprefix: /proxy/
|
|
|
|
# type: reverse
|
|
|
|
# target:
|
|
|
|
# type: http
|
|
|
|
# host: 10.10.1.1
|
|
|
|
# port: 8080
|
|
|
|
# path: /
|
|
|
|
# - &example1
|
|
|
|
# <<: *example1_www
|
|
|
|
# hostname: example1.com
|
|
|
|
#
|
|
|
|
# - &example_www
|
|
|
|
# hostname: www.example.com
|
|
|
|
# docroot: /var/www/example
|
|
|
|
# urlrules:
|
|
|
|
# -
|
|
|
|
# urlprefix: /APIv2
|
|
|
|
# type: uwsgi
|
|
|
|
# target:
|
|
|
|
# type: unix
|
|
|
|
# path: /run/uwsgi/APIv2.sock
|
|
|
|
# - &example
|
|
|
|
# <<: *example_www
|
|
|
|
# hostname: example.com
|
|
|
|
#
|
|
|
|
# - &example_bbs
|
|
|
|
# hostname: bbs.example.com
|
|
|
|
# docroot: /var/www/example_bbs/
|
|
|
|
# urlrules:
|
|
|
|
# -
|
|
|
|
# #urlprefix: \.php$|\.php\/.*
|
|
|
|
# #isregex: true
|
|
|
|
#
|
|
|
|
# urlprefix: /
|
|
|
|
# type: fastcgi
|
|
|
|
# target:
|
|
|
|
# type: unix
|
|
|
|
# path: /var/run/php-fpm/www.sock
|
|
|
|
#
|
|
|
|
# https config
|
|
|
|
#-
|
|
|
|
# host: 0.0.0.0
|
|
|
|
# port: 9002
|
|
|
|
# docroot: /srv/www
|
|
|
|
# enableproxy: false
|
|
|
|
# vhost:
|
|
|
|
# -
|
|
|
|
# <<: *example1
|
|
|
|
# cert: /home/user1/cert/example1.com.crt
|
|
|
|
# key: /home/user1/cert/example1.com.key
|
|
|
|
# -
|
|
|
|
# <<: *example1_www
|
|
|
|
# cert: /home/user1/cert/example1.com.crt
|
|
|
|
# key: /home/user1/cert/example1.com.key
|
|
|
|
# -
|
|
|
|
# <<: *example_www
|
|
|
|
# cert: /etc/letsencrypt/live/example.com/fullchain.pem
|
|
|
|
# key: /etc/letsencrypt/live/example.com/privkey.pem
|
|
|
|
# -
|
|
|
|
# <<: *example
|
|
|
|
# cert: /etc/letsencrypt/live/example.com/fullchain.pem
|
|
|
|
# key: /etc/letsencrypt/live/example.com/privkey.pem
|
|
|
|
# -
|
|
|
|
# <<: *example_bbs
|
|
|
|
# cert: /etc/letsencrypt/live/bbs.example.com/fullchain.pem
|
|
|
|
# key: /etc/letsencrypt/live/bbs.example.com/privkey.pem
|