configure nginx correctly
This commit is contained in:
parent
8ed45e959c
commit
78b3cc189b
@ -1,8 +1,8 @@
|
|||||||
[Roundcube](https://roundcube.net/) webmail interface with postgres backend.
|
[Roundcube](https://roundcube.net/) webmail interface with postgres backend.
|
||||||
|
|
||||||
# Environment Variables
|
# Environment Variables
|
||||||
## DOMAIN
|
## DOMAINS
|
||||||
Space seperated list of domains to listen to.
|
Semicolon seperated list of domains to listen to.
|
||||||
|
|
||||||
## DB_USER
|
## DB_USER
|
||||||
Name of the database user.
|
Name of the database user.
|
||||||
|
@ -18,10 +18,13 @@ http {
|
|||||||
server 127.0.0.1:9000;
|
server 127.0.0.1:9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{{if (getenv "DOMAINS")}}
|
||||||
|
{{range $domain := split (getenv "DOMAINS") ";"}}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|
||||||
server_name {{ getenv "DOMAIN"}};
|
server_name {{ $domain }};
|
||||||
|
|
||||||
root /var/lib/roundcube;
|
root /var/lib/roundcube;
|
||||||
index index.php index.html;
|
index index.php index.html;
|
||||||
@ -54,4 +57,7 @@ http {
|
|||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user