Mercurial Hosting > luan
comparison host/startup/nginx/nginx.conf.luan @ 2133:c3b4c19f2d8a
attempt to autodetect and use nginx confs dir
| author | Violet7 |
|---|---|
| date | Fri, 16 Jan 2026 17:29:05 -0800 |
| parents | 6a2383baecb6 |
| children | de3107eb911f |
comparison
equal
deleted
inserted
replaced
| 2132:44f47df52976 | 2133:c3b4c19f2d8a |
|---|---|
| 1 local rootDir, user, group = ... | 1 local luanhostDir, nginxConfigDir, user, group = ... |
| 2 | 2 |
| 3 %> | 3 %> |
| 4 proxy_cache_path /usr/local/nginx_cache levels=1:2 keys_zone=nginx_cache:60m max_size=10g inactive=60m use_temp_path=off; | 4 proxy_cache_path /usr/local/nginx_cache levels=1:2 keys_zone=nginx_cache:60m max_size=10g inactive=60m use_temp_path=off; |
| 5 server { | 5 server { |
| 6 # ensure no other default_server exists! | 6 # ensure no other default_server exists! |
| 7 # nginx usually has one at /etc/nginx/sites-enabled/default | 7 # nginx usually has one at /etc/nginx/sites-enabled/default |
| 8 listen 80 default_server; | 8 listen 80 default_server; |
| 9 listen [::]:80 default_server; | 9 listen [::]:80 default_server; |
| 10 include <%=rootDir%>/local/nginx.default.conf; | 10 include <%=nginxConfigDir%>/nginx.default.conf; |
| 11 | 11 |
| 12 location /.well-known/acme-challenge/ { | 12 location /.well-known/acme-challenge/ { |
| 13 # $host/ssl does not exist for non-ssl sites and requests to here | 13 # $host/ssl does not exist for non-ssl sites and requests to here |
| 14 # will fail with 404 for those sites, which is what we want | 14 # will fail with 404 for those sites, which is what we want |
| 15 alias <%=rootDir%>/sites/$host/ssl/acme-challenge/; | 15 alias <%=luanhostDir%>/sites/$host/ssl/acme-challenge/; |
| 16 try_files $uri $uri/ =404; | 16 try_files $uri $uri/ =404; |
| 17 } | 17 } |
| 18 } | 18 } |
| 19 | 19 |
| 20 # glob pattern returns no results for site dirs that don't have | 20 # glob pattern returns no results for site dirs that don't have |
| 21 # the ssl/ subdir, so this is ok | 21 # the ssl/ subdir, so this is ok |
| 22 include <%=rootDir%>/sites/*/ssl/nginx.ssl.conf; | 22 include <%=luanhostDir%>/sites/*/ssl/nginx.ssl.conf; |
| 23 <% | 23 <% |
