Add SNAT docs, add Nginx docs

Dieser Commit ist enthalten in:
André 2018-07-20 09:22:23 +02:00
Ursprung bbf65176fc
Commit 92283e65f4
3 geänderte Dateien mit 48 neuen und 0 gelöschten Zeilen

20
docs/firststeps-snat.md Normale Datei
Datei anzeigen

@ -0,0 +1,20 @@
## SNAT
SNAT is used to change the source address of the packets sent by mailcow.
It can be used to change the outgoing IP on systems with multiple IP addresses.
Open `mailcow.conf`, set either or both of the following parameters:
```
# Use this IPv4 for outgoing connections (SNAT)
SNAT_TO_SOURCE=1.2.3.4
# Use this IPv6 for outgoing connections (SNAT)
SNAT6_TO_SOURCE=dead:beef
```
Run `docker-compose up -d`.
The values are read by netfilter-mailcow. netfilter-mailcow will make sure, the post-routing rules are on position 1 in the netfilter table. It does automatically delete and re-create them if they are found on another position than 1.
Check the output of `docker-compose logs --tail=200 netfilter-mailcow` to ensure the SNAT settings have been applied.

26
docs/u_e-nginx.md Normale Datei
Datei anzeigen

@ -0,0 +1,26 @@
## Custom sites
To create persistent (over updates) sites hosted by mailcow: dockerized, a new site configuration must be placed inside `data/conf/nginx/`:
```
nano data/conf/nginx/my_custom_site.conf
```
The filename is not important, as long as the filename carries a .conf extension.
It is also possible to extend the configuration of the default file `site.conf` file:
```
nano data/conf/nginx/site.my_content.custom
```
This filename does not need to have a ".conf" extension, but follows the pattern `site.*.custom`, where `*` is a custom name.
If PHP is to be included in a custom site, please use the PHP-FPM listener on phpfpm:9002 or create a new listener in `data/conf/phpfpm/php-fpm.d/pools.conf`.
Restart Nginx (and PHP-FPM, if a new listener was created):
```
docker-compose restart nginx-mailcow
docker-compose restart php-fpm-mailcow
```

Datei anzeigen

@ -28,6 +28,7 @@ pages:
- 'SSL': 'firststeps-ssl.md'
- 'Rspamd Web UI': 'firststeps-rspamd_ui.md'
- 'Reverse Proxy': 'firststeps-rp.md'
- 'SNAT': 'firststeps-snat.md'
- 'Setup a relayhost': 'firststeps-relayhost.md'
- 'Logging': 'firststeps-logging.md'
- 'Local MTA on Docker host': 'firststeps-local_mta.md'
@ -62,6 +63,7 @@ pages:
- "Expunge a User's Mails": 'u_e-dovecot-expunge.md'
- 'More Examples with DOVEADM': 'u_e-dovecot-more.md'
- 'Move vmail volume': 'u_e-dovecot-vmail-volume.md'
- 'Nginx': 'u_e-nginx.md'
- 'Redis': 'u_e-redis.md'
- 'Rspamd': 'u_e-rspamd.md'
- 'SOGo': 'u_e-sogo.md'