XIBO behind nginx proxy

Hi guys,

I am facing the error running CMS 1.8.2 behind the nginx proxy.
The error says:
Datatables warning tableid = modules - Ajax error.

Anyone has idea how to fix?

Thanks.

I very much doubt it’s related to the nginx proxy directly - assuming you’re just passing the request through and aren’t trying to rewrite part of the URL on the way. Is this a Docker install or custom? If it’s custom, do you have “web” in the URL you’re using to access the CMS.

Hi Alex,

Yeah, I am using docker installation.
I am just doing proxy pass directly.

Is there any way to fix it?

Thanks.

As far as I know it should just work.

If you remove the reverse proxy, the CMS works as expected?

Yeah, working fine if remove the proxy.

Please can you post the configuration you’re using for the proxy then.

For sure Alex!

server {
listen 80;
server_name tv3.endomidia.com.br;

location / {
set $upstr “http://192.168.5.2”;
proxy_pass $upstr;
include proxy_params;
}
}

Try something like

server {
    listen 80;
    server_name tv3.endomeidia.com.br;

    location / {
        proxy_pass http://192.168.5.2:80;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Hi Alex,

I did and does not worked. :frowning2:

I really can’t think why then.

What changes in the logs at the CMS when the proxy is in place?

I’ve done a test here, and exactly the configuration I gave appears to work OK for me (with the IP address changed of course).

I’m using nginx 1.13.7 from the nginx:alpine container to test with.

I am using nginx 1.12.1 from PPA repository.
When you click in Modules page for example, the page load correctly?

I have the proxy listening on port 8080 and the CMS container on 80.

wow !!
Here the page show me an ajax error!
Let me see what is the log message in apache container. At the nginx I can’t see any errors.

Thanks Alex.

BTW, I am not using the same server. The docker is running at 192.168.5.2 and the nginx is running at other server. They have communication inside the lan.

I don’t think that should be any different. I’m only testing with another container as it’s convenient to do so.

It would be worth seeing what URLs are being called from Chrome Developer tools too as that might offer an insight.

Are you using the same syntax in nginx?
I can’t understand why this is not working and yours it’s.

server {
    listen 80;
    server_name tv3.endomeidia.com.br;

    location / {
        proxy_pass http://cms-web:80;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

That’s exactly the config I’m using.

As a side note, you’d probably also want in there a client_max_body_size 2G; line to match the upload size you’ve set in Apache.

Are you using Internet Explorer at all?

We’ve found an issue with Internet Explorer and 1.8.3 CMS. If so, you should be able to pull a new 1.8.3 container down now with the fix in it.

docker-compose pull
docker-compose up -d

with the -f flag if you’re using a custom file.

I did the same and the issue continue.
Well, we are going to use other way instead proxy.

Thank you Alex.