Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vapor: Handle HTTPS requests?

I have a VPS (Ubuntu 14.04) with Apache2, Swift 3.1.1 and Vapor installed. I want to receive client side requests to my Vapor-Built-Service via HTTPS protocol (on port 8443 for example). I didn't find any newbie helper document to do this, so please help me.
Thanks.

like image 997
manili Avatar asked Jan 31 '23 02:01

manili


1 Answers

After a lot of searching I found the answer:
1. You need to install Apache or Nginx on your VPS. Here I assume that the reader uses Apache. But for more info on installing Apache server on Ubuntu 14.04 you can take a look at here.
2. The next thing you need to do is to make Apache work with SSL (or HTTPS protocol). You can find a complete guide here.
3. Now it's time to set the Apache server as a reverse proxy server. You can find a good guide to do that here and here. don't forget to put the reverse-proxy-config-code at port 443 related part.


Update:
There is also another way which you can configure the Vapor directly. Take a look at here.
like image 198
manili Avatar answered Feb 05 '23 15:02

manili