Mercurial Hosting > luan
diff host/startup/nginx/nginx.conf.luan @ 2129:6a2383baecb6
integrate into system nginx
| author | Violet7 |
|---|---|
| date | Fri, 16 Jan 2026 15:30:49 -0800 |
| parents | c9b474306066 |
| children | c3b4c19f2d8a |
line wrap: on
line diff
--- a/host/startup/nginx/nginx.conf.luan Thu Jan 15 21:30:07 2026 -0800 +++ b/host/startup/nginx/nginx.conf.luan Fri Jan 16 15:30:49 2026 -0800 @@ -1,30 +1,13 @@ local rootDir, user, group = ... %> -worker_processes 4; -user <%=user%> <%=group%>; -pid /var/run/luanhost_nginx.pid; - -events { - worker_connections 4096; -} - -http { - include mime.types; - default_type application/octet-stream; - sendfile on; - keepalive_timeout 65; - - proxy_cache_path <%=rootDir%>/local/nginx_cache levels=1:2 keys_zone=nginx_cache:60m max_size=10g inactive=60m use_temp_path=off; - - upstream luan { - server 127.0.0.1:8080; - } - + proxy_cache_path /usr/local/nginx_cache levels=1:2 keys_zone=nginx_cache:60m max_size=10g inactive=60m use_temp_path=off; server { + # ensure no other default_server exists! + # nginx usually has one at /etc/nginx/sites-enabled/default listen 80 default_server; listen [::]:80 default_server; - include nginx.default.conf; + include <%=rootDir%>/local/nginx.default.conf; location /.well-known/acme-challenge/ { # $host/ssl does not exist for non-ssl sites and requests to here @@ -37,5 +20,4 @@ # glob pattern returns no results for site dirs that don't have # the ssl/ subdir, so this is ok include <%=rootDir%>/sites/*/ssl/nginx.ssl.conf; -} <%
