1

Topic: Will my changes to nginx.conf cause a problem?

==== 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.
====

Hello,
I see that iRedmail made many changes to the nginx configurations files.
I am creating websites on the server after the install of iRedMail.

I usually name my server blocks files after the website name such as Freesend.us. BUT that wasn't working. The default site kept on appearing.

I looked in the nginx.conf and saw...

include /etc/nginx/sites-enabled/*.conf and realized my server block file was not being processed.

So I changed the command to ...

include /etc/nginx/sites-enabled/* which is what the original nginx.conf had.

And now the correct website shows up.

BUT will that cause a problem with iRedMail functionality?

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: Will my changes to nginx.conf cause a problem?

The change you made will cause Nginx to try to load any file appearing in the sites-enabled folder, instead of just files ending in '.conf'.  As long as you don't have anything in that folder that isn't a valid Nginx server block file that shouldn't cause a problem.

3

Re: Will my changes to nginx.conf cause a problem?

For me, instead of changing that block I just changed the configs to site.tld.conf. I havent had any issues doing it that way.

4

Re: Will my changes to nginx.conf cause a problem?

Better name your config file to "<something>.conf". If you mistakenly put some files in these folders, Nginx may fail to start due to incorrect syntax.