Topic: roundcube mail subdomain error
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.5.2
- Deployed with iRedMail Easy or the downloadable installer? yes
- Linux/BSD distribution name and version: centos 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
When I enable roundcube-subdomain.tmpl
I get this error and can not start nginx
2022/05/03 12:51:25 [emerg] 95040#0: duplicate location "/" in /etc/nginx/templates/roundcube-subdomain.tmpl:16
here is roundcube-subdomain.tmpl
#
# Run Roundcube as a sub-domain virtual host.
#
# Block access to default directories and files under these directories
location ~ ^/(bin|config|installer|logs|SQL|temp|vendor)/.* { deny all; }
# Block access to default files under top-directory and files start with same name.
location ~ ^/(CHANGELOG|composer.json|INSTALL|jsdeps.json|LICENSE|README|UPGRADING)$ { deny all; }
# Block plugin config files and sample config files.
location ~ ^/plugins/.*/config.inc.php.* { deny all; }
# Block access to plugin data
location ~ ^/plugins/enigma/home($|/.*) { deny all; }
location / {
root /opt/www/roundcubemail;
index index.php index.html;
include /etc/nginx/templates/hsts.tmpl;
}
location ~ \.php$ {
root /opt/www/roundcubemail;
include /etc/nginx/templates/fastcgi_php.tmpl;
fastcgi_param SCRIPT_FILENAME /opt/www/roundcubemail$fastcgi_script_name;
}
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.