1

Topic: Problems with configuration in nginx

Hello, the first thing I want to ask is if iredmail can coexist with other virtual ones within nginx.
My question is this because I have a server running with several virtual and when I install iredmail lost access to all virtual, any url that I call goes directly to the webmail of iredmail.
I have configured the ngnix virtual but they do not respond all go to the webmail of iredmail and I also stop working the https for the other applications, I can only access by ip and http, not https.
This happens to me since I install iredmail, surely the installation changes nginx configurations but I can not find them.

Greetings and thanks

2

Re: Problems with configuration in nginx

Nginx configured by iRedMail loads files from some directories, you need to make sure your virtual web host config files are loaded by Nginx. Please start with /etc/nginx/nginx.conf, check the "include ..." directives.

----

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

Re: Problems with configuration in nginx

ZhangHuangbin wrote:

Nginx configured by iRedMail loads files from some directories, you need to make sure your virtual web host config files are loaded by Nginx. Please start with /etc/nginx/nginx.conf, check the "include ..." directives.

Hi, thanks for your response.
This is my conf from /etc/nginx/nginx.conf

user www-data;
worker_processes 1;
pid /var/run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    include /etc/nginx/conf-enabled/*.conf;
    include /etc/nginx/sites-enabled/*.conf;


In the 00-default.conf I have this:

server {
    # Listen on ipv4
    listen 80;

    # Listen on ipv6.
    # Note: this setting listens on both ipv4 and ipv6 with Nginx release
    #       shipped in some Linux/BSD distributions.
    #listen [::]:80;

    server_name _;

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

In the 00-default-ssl.conf I have this:

server {
    listen 443;
    server_name _;

    root /var/www/html;
    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/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;
}

Then I have other virtual ones that were working until I installed iredmail, since I install when I call any virutal the webmail of iredmail always speaks to me.
I do not see anything more than this.

Thanks for your answer

4

Re: Problems with configuration in nginx

ffrcaraballo wrote:

Then I have other virtual ones that were working until I installed iredmail, since I install when I call any virutal the webmail of iredmail always speaks to me.

Do you have config files for these web hosts under /etc/nginx/sites-enabled/ (and ends with '.conf')?

----

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

buy me a cup of coffee

5

Re: Problems with configuration in nginx

ZhangHuangbin wrote:
ffrcaraballo wrote:

Then I have other virtual ones that were working until I installed iredmail, since I install when I call any virutal the webmail of iredmail always speaks to me.

Do you have config files for these web hosts under /etc/nginx/sites-enabled/ (and ends with '.conf')?



Yes I have
They are the 3 that I post here.
The default ones are .conf, the other one that I use for odoo is not, I named it only "odoo".
I had already tried with the name of odoo.conf and it did not work either

6

Re: Problems with configuration in nginx

ffrcaraballo wrote:

The default ones are .conf, the other one that I use for odoo is not, I named it only "odoo".
I had already tried with the name of odoo.conf and it did not work either

Please show us where the files are.

Note: Nginx only loads web host config files from /etc/nginx/sites-enabled/, is this the place you store config files for odoo web host?

When you run "nginx -t", does it report any error?

----

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

buy me a cup of coffee