<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hey guys!<br class=""><br class="">StackOverflow didn’t do anything this time, so I decided to visit here and try asking my question here! :)<br class=""><br class="">A bit of backstory:<br class="">I have had a fatal server crash. 464 days of uptime with unapplied updates from an OS upgrade, kernel patches and more. When I did do a reboot…it all exploded right into my face :( So I reinstalled.<br class=""><br class="">Now that I have learned this lesson, I decided to begin deploying things in containers - just raw Virtual Box VMs now, as I haven’t gotten used to Docker or Vagrant. But using a VM with NAT allows me to forward ports.<br class=""><br class="">One of the VMs is your typical web-server setup; MySQL, PHP5 (FPM) and Nginx (1.8.x). So I have my main server - the VM host - listening on 80 and 443 and forwarded the VM’s ports as 11080 and 11443. Forwarding regular HTTP works flawlessly by just proxy_pass’ing to the other port. No problem here.<br class=""><br class="">But how do I work out a reverse-proxy for HTTPS traffic? Mainly, I have another VM that runs OwnCloud. I want to forward my host’s 443 port to the VM’s exposed 12443 port so that OwnCloud stops complaining about being opened via raw HTTP.<br class=""><br class="">Since I am re-using configuration a lot, I have created a basic_proxy file, and a regular sites-enabled/ file. You can see them here: <a href="https://gist.github.com/IngwiePhoenix/19631bd07af62d23b8f3" class="">https://gist.github.com/IngwiePhoenix/19631bd07af62d23b8f3</a> <<a href="https://gist.github.com/IngwiePhoenix/19631bd07af62d23b8f3" class="">https://gist.github.com/IngwiePhoenix/19631bd07af62d23b8f3</a>><br class=""><br class="">Would be cool if I could keep with this approach to simply forward traffic to my various VMs, but keeping my config reusable!<br class=""><br class="">Kind regards,<br class="">Ingwie.</body></html>