Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Deploy MEANJS application to Ubuntu using Nginx as a reverse proxy with SSL #1115

Closed
pddkhanh opened this issue Dec 23, 2015 · 4 comments
Closed
Assignees
Milestone

Comments

@pddkhanh
Copy link

Hi,

First of all, I want to say thank you all for incredible works. I'm using your meanjs and happy with it. I just has a little confuse when trying to deploy application in my Ubuntu server.

I'm using mean 0.4.1, and start it with production mode in port 8443. And I set up Nginx on port 80, and pass request to 0.0.0.0:8443 (MEAN application). Now I want to use SSL, I see MEANJS has option to configure SSL also, but I see I can configure SSL on Nginx also.

So my question is, can I just configure SSL on Nginx, and disable MeanJS "secure" option on configuration file? Or I have to enable SSL on both Nginx and MeanJS and point to the same key files?

I'm very appriciate if you guy can help me explain this. Thank you agains.

@pddkhanh pddkhanh changed the title Deploy MEANJS application to Ubuntu using Nginx as a reverse proxy Deploy MEANJS application to Ubuntu using Nginx as a reverse proxy with SSL Dec 23, 2015
@lirantal
Copy link
Member

Hi @itleo31

Thanks for the kind words! Happy you're having fun with it.

Generally speaking, you don't need to work with SSL enabled on both your public facing proxy and the internal application (even though technically you can do that). You don't want to do it due to the fact that you're adding more work on both layers which is un-necessary and only adds complexity and performance issues.

You should probably do the SSL termination on the Nginx server and forward the traffic to your MEAN.js application on port 80.

@lirantal lirantal self-assigned this Dec 23, 2015
@lirantal lirantal added this to the 0.5.0 milestone Dec 23, 2015
@mattbodman
Copy link

Hi @lirantal, I'm coming over to MeanJS from the Python Pyramid world and I will be dealing with this SSL question myself before too long. In Pyramid, even though Nginx would handle the SSL, I still had to stipulate that the url scheme was HTTPS in the Pyramid config. Is there a similar config requirement in Node or Express? If so, where?

@pddkhanh
Copy link
Author

Hi @lirantal,

Thank you very much for your kind support.I can continue with myself from now.

Best Regards

@lirantal
Copy link
Member

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants