Last active
April 20, 2021 09:30
-
-
Save hnykda/d3575130fcc9762511587fa35d0c0f7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apps":{ | |
"http":{ | |
"servers":{ | |
"srv0":{ | |
"listen":[ | |
":443" | |
], | |
"routes":[ | |
{ | |
"match":[ | |
{ | |
"host":[ | |
"mudrhnykova.eu", | |
"www.mudrhnykova.eu" | |
] | |
} | |
], | |
"handle":[ | |
{ | |
"handler":"subroute", | |
"routes":[ | |
{ | |
"handle":[ | |
{ | |
"handler":"vars", | |
"root":"/sites/zubni_praxe" | |
}, | |
{ | |
"handler":"file_server", | |
"hide":[ | |
"./Caddyfile" | |
] | |
} | |
] | |
} | |
] | |
} | |
], | |
"terminal":true | |
}, | |
{ | |
"match":[ | |
{ | |
"host":[ | |
"finaholding.cz", | |
"www.finaholding.cz" | |
] | |
} | |
], | |
"handle":[ | |
{ | |
"handler":"subroute", | |
"routes":[ | |
{ | |
"handle":[ | |
{ | |
"handler":"reverse_proxy", | |
"upstreams":[ | |
{ | |
"dial":"tatkafina:80" | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
], | |
"terminal":true | |
}, | |
{ | |
"match":[ | |
{ | |
"host":[ | |
"sovazlutice.eu", | |
"www.sovazlutice.eu" | |
] | |
} | |
], | |
"handle":[ | |
{ | |
"handler":"subroute", | |
"routes":[ | |
{ | |
"handle":[ | |
{ | |
"handler":"reverse_proxy", | |
"upstreams":[ | |
{ | |
"dial":"sovazlutice:8001" | |
} | |
] | |
} | |
], | |
"match":[ | |
{ | |
"path":[ | |
"/" | |
] | |
} | |
] | |
} | |
] | |
} | |
], | |
"terminal":true | |
}, | |
{ | |
"match":[ | |
{ | |
"host":[ | |
"danielhnyk.cz", | |
"www.danielhnyk.cz" | |
] | |
} | |
], | |
"handle":[ | |
{ | |
"handler":"subroute", | |
"routes":[ | |
{ | |
"handle":[ | |
{ | |
"handler":"reverse_proxy", | |
"upstreams":[ | |
{ | |
"dial":"danielhnyk:2368" | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
], | |
"terminal":true | |
}, | |
{ | |
"match":[ | |
{ | |
"host":[ | |
"kvleasing.cz", | |
"www.kvleasing.cz" | |
] | |
} | |
], | |
"handle":[ | |
{ | |
"handler":"subroute", | |
"routes":[ | |
{ | |
"handle":[ | |
{ | |
"handler":"reverse_proxy", | |
"upstreams":[ | |
{ | |
"dial":"tatkakvleasing:80" | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
], | |
"terminal":true | |
}, | |
{ | |
"match":[ | |
{ | |
"host":[ | |
"pavlam.cz", | |
"www.pavlam.cz" | |
] | |
} | |
], | |
"handle":[ | |
{ | |
"handler":"subroute", | |
"routes":[ | |
{ | |
"handle":[ | |
{ | |
"handler":"vars", | |
"root":"/sites/pavlam" | |
}, | |
{ | |
"handler":"file_server", | |
"hide":[ | |
"./Caddyfile" | |
] | |
} | |
] | |
} | |
] | |
} | |
], | |
"terminal":true | |
} | |
] | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream upstream_server { | |
server sovazluticeApp:8000 fail_timeout=5s; | |
} | |
server { | |
listen 8001; | |
server_name localhost; | |
client_max_body_size 4G; | |
access_log off; | |
location /static/ { | |
autoindex on; | |
alias /dstatic/; | |
} | |
location /media/ { | |
autoindex on; | |
alias /dmedia/; | |
} | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
if (!-f $request_filename) { | |
proxy_pass http://upstream_server; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment