2023-11-16 04:35:44 +00:00
|
|
|
#!/usr/bin/env -S deno run -A
|
|
|
|
|
|
|
|
import ngx from "https://char.lt/ngx/ngx.ts?v=1";
|
|
|
|
|
2023-11-16 04:37:56 +00:00
|
|
|
export const config = ngx("server", [
|
2023-11-16 04:35:44 +00:00
|
|
|
[
|
|
|
|
"server_name bio.char.lt",
|
|
|
|
...ngx.listen(),
|
|
|
|
...ngx.letsEncrypt("bio.char.lt"),
|
|
|
|
],
|
|
|
|
ngx("location /", ["root /srv/http/bio.char.lt/public"]),
|
2023-11-16 04:37:00 +00:00
|
|
|
]);
|
|
|
|
|
2023-12-04 17:22:03 +00:00
|
|
|
export const path = "bio-char-lt.conf";
|
2023-11-16 04:37:56 +00:00
|
|
|
|
2023-11-16 04:37:00 +00:00
|
|
|
if (import.meta.main) {
|
2023-12-04 17:22:03 +00:00
|
|
|
config.write(`/etc/nginx/http.d/${path}`);
|
2023-11-16 04:37:00 +00:00
|
|
|
}
|