view host/startup/nginx/nginx.conf.luan @ 2114:3d9c0061baf7 ssltesting tip

Https cleanup untested
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 19 Dec 2025 15:12:31 -0700
parents 0d247a84c26d
children
line wrap: on
line source

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;
	}

	server {
		listen 80 default_server;
		listen [::]:80 default_server;
		include nginx.default.conf;

		location /.well-known/acme-challenge/ {
			alias <%=rootDir%>/sites/$host/acme-challenge/;
			autoindex on;
		}
	}

	include <%=rootDir%>/sites/*/nginx.ssl.conf;
}
<%