diff options
Diffstat (limited to 'modules/tozt/files/nginx/mail.conf')
-rw-r--r-- | modules/tozt/files/nginx/mail.conf | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/tozt/files/nginx/mail.conf b/modules/tozt/files/nginx/mail.conf new file mode 100644 index 0000000..5af975a --- /dev/null +++ b/modules/tozt/files/nginx/mail.conf @@ -0,0 +1,35 @@ +server { + listen 80; + server_name mail.tozt.net; + + access_log /var/log/nginx/mail.access.log; + error_log /var/log/nginx/mail.error.log; + + rewrite ^(.*) https://$host$1 permanent; +} + +server { + listen 443; + server_name mail.tozt.net; + + access_log /var/log/nginx/mail.access.log; + error_log /var/log/nginx/mail.error.log; + + include ssl; + add_header Strict-Transport-Security max-age=15768000; + + location / { + root /usr/share/webapps/roundcubemail; + index index.php index.html index.htm; + } + + location ~ \.php$ { + root /usr/share/webapps/roundcubemail; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /usr/share/webapps/roundcubemail$fastcgi_script_name; + fastcgi_param HTTPS on; + include fastcgi_params; + } +} +# vim:ft=nginx |