1 (edited by gr8k9t 2017-09-10 21:28:34)

Topic: Nginx Configuration

==== Required information ====
- iRedMail version : 0.9.7
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL: PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
====

I intend to use nginx for serving both iredmail and a django application on the same instance. My nginx configuration is a bit of a maze. There is no file at /etc/nginx/conf.d , I expected default.conf. Everything seems to run through /etc/nginx/conf-enabled/* and /etc/nginx/sites-enabled/* . I need help configuring a server block for my app on a different port so that I can type example.com/www.example.com and it goes to my django app.

I tried testing with
server {
    listen 8080;
    server_name example.com www.example.com;

    root /var/www/html;
    index index.nginx-debian.html;
}

added to /etc/nginx/sites-available/example and sym linked to /etc/nginx/sites-enabled

I removed the redirect on /var/www/html/index.html but I get a blank page

Any assistance is welcome and highly appreciated

2

Re: Nginx Configuration

Simply add your Nginx config under /etc/nginx/sites-available/, then create a symbol link to /etc/nginx/sites-enabled/, reload nginx.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3 (edited by gr8k9t 2017-09-11 00:05:04)

Re: Nginx Configuration

I have for a number of times.

I also tried with iRedmail 0.9.6 and I get similar results.
On my /var/log/nginx/access.log the client is detected properly but the html page is not rendered.