Indico behind Nginx reverse proxy


#1

Hi,

I spend a lot of trying trying to find the solution by myself but I can’t find …

I have a Indico server running behind another server which is a nginx reverse proxy. The reverse proxy manage SSL, and communicates with other servers by HTTP and I wan’t to do the same with indico. When I deactivate SSL it’s OK (so USER<->HTTP<->REVERSE<-> HTTP <-> INDICO), but when I activate SSL on proxy, I got a lot of errors (so USER<->HTTPS<->REVERSE<-> HTTP <-> INDICO) :

I tried all possible apache conf (on Indico server), all possible Nginx conf and all possible indico.conf options, it always do the same …

So if someone has any idea or a working config I would appreciate :slight_smile:

Regards


#2

Open one of the files that show up with a syntax error directly to see if they contain anything that looks strange.


#3

Thanks for your answer

I did, nothing looks strange, it’s the “normal” file. What is strange is that it’s not a “mixed content” error or anything like that which could be easy to understand as it’s a classic error mixing http and https, no, it’s a JS error like a script is not running and objects that are created in doesn’t exist :s


#4

Strange… Unfortunately I only get your website when accessing http://indico.labsud.org/ and not Indico - otherwise I could have had a look…


#5

As I wanted to demonstrate Indico to other people, I let this instance in HTTP and I created another one in order to try to solve this https issue : https://indicodev.labsud.org


#6

I made some tests : some js scripts seems to be accessible and others not. I simply took direct link and try a GET. I got “protocol error” and some files are truncated :

UPDATE : it’s really strange, when I try to GET a script directly, sometimes it works, sometimes it fails (the file is cut after ~16000 char, size issue ?)


#7

https://www.ssllabs.com/ssltest/analyze.html?d=indicodev.labsud.org shows some warnings but nothing likely related to your problem.

But since you mentioned the size, please check your nginx logs if there are any errors related to buffering data. With the correct aliases (make sure you use the one from https://docs.getindico.io/en/stable/ and not https://docs.getindico.io/en/latest/) nginx serves the data directly, buf if the aliases are wrong/missing, then the data would go through the Indico Python app and uwsgi, and nginx may need to buffer the data.


#8

I checked : no error on Nginx reverse proxy, and no error on Indico Apache :s

Something more : behind this reverse proxy I have several servers that work well (nextcloud, Dolibarr, RocketChat, Wekan …), Indico is the only one giving this errors.


#9

So you have a nginx in front of Apache? Or what exactly is the setup you have?

Could you post the indico-related configs?


#10

Great new : it works :slight_smile: But I haven’t clear explanation … What I changed ? I switch to Nginx on Indico server.

To make things clear :

Before before (working) :
Client <-> HTTP <-> Nginx Reverse Proxy <-> HTTP <-> Apache Indico

Before (not working) :
Client <-> HTTPS <-> Nginx Reverse Proxy <-> HTTP <-> Apache Indico

Now (working):
Client <-> HTTPS <-> Nginx Reverse Proxy <-> HTTP <-> Nginx Indico

When I switched from Apache to Nginx, I got some error about file permissions (maybe I forgot a step ?) that I solved like a pig with chmod 777. Maybe Nginx is more explicit than Apache ? I don’t know … I will make a clean install and tell you if I find something.

But before switching I tried everything : adding buffer on reverse proxy, add all options possible … I changed nothing. Sometimes files were complete, sometimes they were cut.