1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00

manage the nginx conf in the management daemon too so we can have nginx operate on all domains that we serve mail for

This commit is contained in:
Joshua Tauberer
2014-06-20 01:16:38 +00:00
parent a1a80b295e
commit 5faa1cae71
7 changed files with 133 additions and 22 deletions

View File

@@ -1,11 +1,11 @@
# Redirect all HTTP to HTTPS.
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
listen [::]:80;
server_name $PUBLIC_HOSTNAME;
server_name $HOSTNAME;
root /tmp/invalid-path-nothing-here;
rewrite ^/(.*)$ https://$PUBLIC_HOSTNAME/$1 permanent;
rewrite ^/(.*)$ https://$HOSTNAME/$1 permanent;
}
# The secure HTTPS server.
@@ -13,14 +13,14 @@ server {
server {
listen 443 ssl;
server_name $PUBLIC_HOSTNAME;
server_name $HOSTNAME;
ssl_certificate $STORAGE_ROOT/ssl/ssl_certificate.pem;
ssl_certificate_key $STORAGE_ROOT/ssl/ssl_private_key.pem;
ssl_certificate $SSL_CERTIFICATE;
ssl_certificate_key $SSL_KEY;
include /etc/nginx/nginx-ssl.conf;
# Expose this directory as static files.
root $STORAGE_ROOT/www/static;
root $ROOT;
index index.html index.htm;
# Roundcube Webmail configuration.