1

Topic: nginx change my.domain.de/mail to webmail.domain.de

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (1.1):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Ubuntu 18.04.4 LTS
- 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.
====
sorry, my english is bad:
I don't want the url my.domain.de/mail but webmail.domain.de. how do i change this nginx configuration.
unfortunately I don't understand the structure.
where do I have to change something?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: nginx change my.domain.de/mail to webmail.domain.de

Save this as /etc/nginx/sites-available/webmail.domain.de.conf, then create a symbol link to /etc/nginx/sites-enabled/webmail.domain.de.conf, restart nginx service:

server {
    listen 80;
    listen [::]:80;
    server_name webmail.domain.de;

    # Redirect all insecure http:// requests to https://
    return 301 https://$host$request_uri;
}

# HTTPS
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name webmail.domain.de;

    index index.php index.html;

    include /etc/nginx/templates/misc.tmpl;
    include /etc/nginx/templates/ssl.tmpl;
    include /etc/nginx/templates/iredadmin.tmpl;
    include /etc/nginx/templates/sogo.tmpl;
    include /etc/nginx/templates/netdata.tmpl;
    include /etc/nginx/templates/php-catchall.tmpl;
    include /etc/nginx/templates/stub_status.tmpl;

    include /etc/nginx/templates/roundcube-homepage.tmpl;
    root /opt/www/roundcubemail;
}

Make sure "roundcube-homepage.tmpl" is the last "include" directive, so that it won't match other URLs like /iredadmin, /SOGo. if you don't need other web applications, just remove the "include" lines.