1

Topic: Added website of the same name as Host

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.0
- Deployed with iRedMail Easy or the downloadable installer?Download
- Linux/BSD distribution name and version: Ubuntu 18.04
- 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.
====

I added a Website with the same name as the host in Nginx. I created a separate Server Block for that URL. I want to be able to explain our new email service in the website. BUT now when I type https://freesend.causeaction.com/iredadmin I get not found. But when I type https://freesend.causeaction.com the website shows up nicely.

Can you help me with what I must do now to allow iRedAdmin and also Roundcube to appear while still keeping my Website active? Thank you

----

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

2

Re: Added website of the same name as Host

So I see this in the 00-default-ssl.conf file, "This file must be loaded before other virtual host config files".

I am not sure how Nginx determines the load order. I presume my "virtual host config files" is the Server block config I created.

Will placing my server block code in  00-default-ssl.conf beneath the default server block? Or must I have these includes in the custom server block code?

    include /etc/nginx/templates/misc.tmpl;
    include /etc/nginx/templates/ssl.tmpl;
    include /etc/nginx/templates/iredadmin.tmpl;
    include /etc/nginx/templates/roundcube.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;

Thank you

3

Re: Added website of the same name as Host

Nginx loads the files in order by the file name. Leading numbers "00-" will make sure it's the first one (if you don't have similar file names). So just name your site config file with domain name and ends with ".conf" under /etc/nginx/sites-available/ and link to /etc/nginx/sites-enabled/ is fine.