update config example

master
Dingjun 8 years ago
parent 3f431535a9
commit 03e46baecd

@ -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
-
# 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 # isregex: true
# type: fastcgi
urlprefix: / # target:
type: fastcgi # type: unix
target: # path: /var/run/php-fpm/www.sock
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 # 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