1

Topic: Adding an extra website to nginx doesn't work

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  Latest
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Ubuntu 20.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- 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 have iRedMail on a VPS. It works. It is hosted on mail.mydomain.com. I added another website configuration to /etc/nginx/sites-available and did the symbol link to /etc/nginx/sites-enabled and I restarted nginx. But the website doesn't work.

Here is the nginx configuration titled "mydomain.com.conf":
server {
    listen        80;
    server_name   mydomain.com;
    location / {
        proxy_pass         http://localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection keep-alive;
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
    }
}

This is an ASP.NET Core website. This is where I got information for hosting on linux https://docs.microsoft.com/en-us/aspnet … etcore-3.1

What did I do wrong?

----

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

2

Re: Adding an extra website to nginx doesn't work

Please check Nginx log to figure it out: /var/log/nginx/error.log.