Mercurial Hosting > luan
comparison host/startup/nginx/9990-luanhost_controller.conf.luan @ 2147:515e892cd4c2 nginx_decoupled tip
set nginx error log; rename luanhost_controller
| author | Violet7 |
|---|---|
| date | Wed, 21 Jan 2026 21:57:07 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 2146:2bc779c2451d | 2147:515e892cd4c2 |
|---|---|
| 1 local luanhostDir = ... | |
| 2 | |
| 3 %> | |
| 4 # IMPORTANT: | |
| 5 # directives outside `server` blocks are applied directly to the | |
| 6 # `http` block that this file is `include`d in. all these directives | |
| 7 # will apply to luanhost *AND* everything `include`d after it. | |
| 8 # this file name is preceded with `9990` so the glob expansion | |
| 9 # loads it towards the end of the list. | |
| 10 | |
| 11 proxy_cache_path /usr/local/nginx_cache levels=1:2 keys_zone=nginx_cache:60m max_size=10g inactive=60m use_temp_path=off; | |
| 12 error_log <%=luanhostDir%>/logs/nginx_error.log warn; | |
| 13 | |
| 14 server { | |
| 15 # ensure no other default_server exists! | |
| 16 # nginx usually has one at /etc/nginx/sites-enabled/default | |
| 17 listen 80 default_server; | |
| 18 listen [::]:80 default_server; | |
| 19 # DON'T put this in the auto-loaded configs dir, | |
| 20 # it is not meant to be loaded on its own. | |
| 21 include <%=luanhostDir%>/local/luanhost_default_site.conf; | |
| 22 | |
| 23 location /.well-known/acme-challenge/ { | |
| 24 # $host/ssl does not exist for non-ssl sites and requests to here | |
| 25 # will fail with 404 for those sites, which is what we want | |
| 26 alias <%=luanhostDir%>/sites/$host/ssl/acme-challenge/; | |
| 27 try_files $uri $uri/ =404; | |
| 28 } | |
| 29 } | |
| 30 | |
| 31 # glob pattern returns no results for site dirs that don't have | |
| 32 # the ssl/ subdir, so this is ok | |
| 33 include <%=luanhostDir%>/sites/*/ssl/nginx.ssl.conf; | |
| 34 <% |
