mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
nginx: allow custom nginx config under sites-enabled
fix 562
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
## untagged
|
## untagged
|
||||||
|
|
||||||
|
- Allow custom nginx config files
|
||||||
|
([#617](https://github.com/chatmail/relay/pull/617))
|
||||||
|
|
||||||
- Check whether GCC is installed in initenv.sh
|
- Check whether GCC is installed in initenv.sh
|
||||||
([#608](https://github.com/chatmail/relay/pull/608))
|
([#608](https://github.com/chatmail/relay/pull/608))
|
||||||
|
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -255,6 +255,19 @@ This starts a local live development cycle for chatmail web pages:
|
|||||||
|
|
||||||
- Starts a browser window automatically where you can "refresh" as needed.
|
- Starts a browser window automatically where you can "refresh" as needed.
|
||||||
|
|
||||||
|
#### Custom web pages
|
||||||
|
|
||||||
|
If you want to include other pages,
|
||||||
|
they need their separate nginx config
|
||||||
|
under `/etc/nginx/sites-enabled/`.
|
||||||
|
Note that they need to listen on port 8443 instead of 443.
|
||||||
|
|
||||||
|
To request TLS certificates for the corresponding domains,
|
||||||
|
point the DNS records to your Server and run `acmetool want <domain>`.
|
||||||
|
You can find the TLS certificates under `/var/lib/acme/live`.
|
||||||
|
They will be automatically renewed.
|
||||||
|
|
||||||
|
|
||||||
## Mailbox directory layout
|
## Mailbox directory layout
|
||||||
|
|
||||||
Fresh chatmail addresses have a mailbox directory that contains:
|
Fresh chatmail addresses have a mailbox directory that contains:
|
||||||
|
|||||||
@@ -424,6 +424,12 @@ def _configure_nginx(config: Config, debug: bool = False) -> bool:
|
|||||||
"""Configures nginx HTTP server."""
|
"""Configures nginx HTTP server."""
|
||||||
need_restart = False
|
need_restart = False
|
||||||
|
|
||||||
|
files.link(
|
||||||
|
name="disable nginx default site",
|
||||||
|
path="/etc/nginx/sites-enabled/default",
|
||||||
|
present=False,
|
||||||
|
)
|
||||||
|
|
||||||
main_config = files.template(
|
main_config = files.template(
|
||||||
src=importlib.resources.files(__package__).joinpath("nginx/nginx.conf.j2"),
|
src=importlib.resources.files(__package__).joinpath("nginx/nginx.conf.j2"),
|
||||||
dest="/etc/nginx/nginx.conf",
|
dest="/etc/nginx/nginx.conf",
|
||||||
|
|||||||
@@ -136,4 +136,7 @@ http {
|
|||||||
return 301 $scheme://{{ config.domain_name }}$request_uri;
|
return 301 $scheme://{{ config.domain_name }}$request_uri;
|
||||||
access_log syslog:server=unix:/dev/log,facility=local7;
|
access_log syslog:server=unix:/dev/log,facility=local7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Include custom pages; they need to listen on port 8443 instead of port 443
|
||||||
|
include /etc/nginx/sites-enabled/*;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user