There was an error proxying the request (Please help)


Running Zotonic on c9 and got this error:
There was an error proxying the request

The request could not be proxied because some headers contained invalid data.

In my Zotonic console I got normal listening on these ports:
14:19:35.416 [info] zotonic:147 Web server listening on IPv4 any:8081, SSL any::8080
14:19:35.737 [info] zotonic:183 Web server listening on IPv6 ::8081, SSL ::8080
14:19:39.253 [info] zotonic_sup:117
14:19:39.253 [info] zotonic_sup:128

This is Zotonic doc about ports (

How can I get the log of the proxy?

Thanks in advance for any reply!


This could be because you’re trying to serve the app via https. When previewing Cloud9 applications, the application proxy automatically converts all apps to use https. Because of that, you should use http when serving your app and then you’ll be given https for free.


Thanks a lot! Will try to avoid https.

Yay, it works!
Thanks again!


Alternatively, if you would like to use HTTPS​ anyway, you can have it listen on localhost ( with HTTPS and terminate early with an NGINX reverse proxy that listens on $IP and forwards from<port>/. I often do something like this so I can run production code and not worry about the limitations of Cloud9.


Brilliant. I’ve never set this up before but this is indeed nice that you can deploy code without having to remember make that change :thumbsup:


I’m not sure I understand, what you say…
If I understand then - yes, I changed Zotonic config file, make, run and voila :slight_smile:

Sorry for short description, I was excited…