Configuring a reverse-proxy for HTTPS connection
Thanks in advance for any help!
I'm running my forum on Ubuntu 13.1 on an EC2 instance. I'm using Apache 2 as a reverse proxy server to establish a secure connection on port 443.
The problem is that when I visit the website via HTTPS, I get many errors of these 3 types:
Failed to load resource: the server responded with a status of 502 (Proxy Error)
Uncaught ReferenceError: require is not defined
Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
Here's my config file:
Allow from all
ProxyPass / http://127.0.0.1:4568
ProxyPassReverse / http://127.0.0.1:4568
Any ideas what's going wrong? Do you think it has something to do with Apache or NodeBB? Thanks!
Thanks for your help pointing me to this solution in the first place. I did get the reverse proxy set up. Unfortunately the page is rendered without any CSS or JS.
Do you think there's a fix I could make on NodeBB or is it maybe a permissions issue I could solve on the EC2 dashboard?
I'd really appreciate any advice on this one. I'm at a dead end. Thanks!
That's weird... what happens when you view the source and try to go to the css file directly?
Actually, come to think of it, I just refactored the js and css file handling today, so maybe give the latest version a go.
Hi @julian thanks for the help! I'll try upgrading it.
When I navigate to
https://forum.figma.com/vendor/fontawesome/css/font-awesome.min.css, I get to a 502 Proxy Error page with this text:
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /vendor/fontawesome/css/font-awesome.min.css.
Reason: DNS lookup failure for: 127.0.0.1:4567vendor
Apache/2.4.6 (Ubuntu) Server at forum.figma.com Port 443
Hm, looks like it's missing a
/. Let me know if the latest version helps (though plugin js still might be off...)
As @julian suggested, add a trailing / to both your proxypaths in your apache config.
Hi, thanks everyone! You're the best! The site loads perfectly now.
As for upgrading, I think I may be a major revision behind. Can you point me to instructions to safely upgrade? I'm not even sure which version I'm currently running on...
The version you are running should be clearly visible on the ACP home page.
Thanks @planner. Okay, so I'm running 0.3.0. And it looks like the current release is 0.3.2. When I pull, it lists all the conflicts along with the files it's auto-merging and removing. Since I have a backup of the last version and I only made a couple small changes I can easily redo, I'd like to just upgrade unconditionally (assuming the new version will still be able to talk to my Redis instance!).
Should I just delete all the files in my forum directory and do a new git pull??
This is how I upgrade (based on the official guide)
cp dump.db /some/dir
cp appendonly.aof /some/dir
git pull (from NodeBB install root dir.)
So far, I've never gad any issues upgrading, other than losing modifications to templates files that were hard-coded. But those modifications were for testing, so they did not bother me much.
@aaron -- to discard all changes on your working copy (again, this discards all changes
git reset --hard HEAD
git pull && ./nodebb upgrade