update config example

master
Dingjun 8 years ago
parent 3f431535a9
commit 03e46baecd

@ -17,7 +17,7 @@
enableproxy: false enableproxy: false
# default host's url rule # default host's url rule
#urlrules: # urlrules:
# - # -
# urlprefix: /a # urlprefix: /a
# type: alias # type: alias
@ -32,99 +32,111 @@
# path: /home/user1/a/b/a.txt # path: /home/user1/a/b/a.txt
# virtual host config # virtual host config
vhost: # vhost:
- &example1_www # - &example1_www
hostname: www.example1.com # hostname: www.example1.com
docroot: /var/www/html/ # docroot: /var/www/html/
# cert: # # cert:
# key: # # key:
#
# url rule for www.example.com # # url rule for www.example.com
urlrules: # urlrules:
- # -
# url start with /APIv1/ forward to uwsg socket # # url start with /APIv1/ forward to uwsg socket
urlprefix: /APIv1/ # urlprefix: /APIv1/
type: uwsgi # type: uwsgi
target: # target:
type: unix # type: unix
path: /run/uwsgi/APIv1.sock # path: /run/uwsgi/APIv1.sock
- # -
# route php script to fastCGI socket # # run php script on /phpmyadmin/ subdirectory
urlprefix: /phpmyadmin/.*\.php$ # urlprefix: /phpmyadmin/
# type: fastcgi
# set to true means urlprefix is regex expression # target:
isregex: true # type: unix
# path: /var/run/php-fpm/www.sock
type: fastcgi # -
target: # # pass php to fastcgi socket
type: unix # urlprefix: \.php$|\.php/.*
path: /var/run/php-fpm/www.sock # isregex: true
- # type: fastcgi
# url start with /proxy/ reverse proxy for http://10.10.1.1/ # target:
# this act as reverse proxy # type: unix
urlprefix: /proxy/ # path: /var/run/php-fpm/www.sock
type: reverse # -
target: # # run php script on other location
type: http # urlprefix: /a/
host: 10.10.1.1 # docroot: /home/user/php
port: 8080 # type: fastcgi
path: / # target:
- &example1 # type: unix
<<: *example1_www # path: /var/run/php-fpm/www.sock
hostname: example1.com # -
# # url start with /proxy/ reverse proxy for http://10.10.1.1/
- &example_www # # this act as reverse proxy
hostname: www.example.com # urlprefix: /proxy/
docroot: /var/www/example # type: reverse
urlrules: # target:
- # type: http
urlprefix: /APIv2 # host: 10.10.1.1
type: uwsgi # port: 8080
target: # path: /
type: unix # - &example1
path: /run/uwsgi/APIv2.sock # <<: *example1_www
- &example # hostname: example1.com
<<: *example_www #
hostname: example.com # - &example_www
# hostname: www.example.com
- &example_bbs # docroot: /var/www/example
hostname: bbs.example.com # urlrules:
docroot: /var/www/example_bbs/ # -
urlrules: # urlprefix: /APIv2
- # type: uwsgi
#urlprefix: \.php$|\.php\/.* # target:
#isregex: true # type: unix
# path: /run/uwsgi/APIv2.sock
urlprefix: / # - &example
type: fastcgi # <<: *example_www
target: # hostname: example.com
type: unix #
path: /var/run/php-fpm/www.sock # - &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 # https config
- #-
host: 0.0.0.0 # host: 0.0.0.0
port: 9002 # port: 9002
docroot: /srv/www # docroot: /srv/www
enableproxy: false # enableproxy: false
vhost: # vhost:
- # -
<<: *example1 # <<: *example1
cert: /home/user1/cert/example1.com.crt # cert: /home/user1/cert/example1.com.crt
key: /home/user1/cert/example1.com.key # key: /home/user1/cert/example1.com.key
- # -
<<: *example1_www # <<: *example1_www
cert: /home/user1/cert/example1.com.crt # cert: /home/user1/cert/example1.com.crt
key: /home/user1/cert/example1.com.key # key: /home/user1/cert/example1.com.key
- # -
<<: *example_www # <<: *example_www
cert: /etc/letsencrypt/live/example.com/fullchain.pem # cert: /etc/letsencrypt/live/example.com/fullchain.pem
key: /etc/letsencrypt/live/example.com/privkey.pem # key: /etc/letsencrypt/live/example.com/privkey.pem
- # -
<<: *example # <<: *example
cert: /etc/letsencrypt/live/example.com/fullchain.pem # cert: /etc/letsencrypt/live/example.com/fullchain.pem
key: /etc/letsencrypt/live/example.com/privkey.pem # key: /etc/letsencrypt/live/example.com/privkey.pem
- # -
<<: *example_bbs # <<: *example_bbs
cert: /etc/letsencrypt/live/bbs.example.com/fullchain.pem # cert: /etc/letsencrypt/live/bbs.example.com/fullchain.pem
key: /etc/letsencrypt/live/bbs.example.com/privkey.pem # key: /etc/letsencrypt/live/bbs.example.com/privkey.pem

Loading…
Cancel
Save