title: Vagrant Apache2 http/https port forwarding
body: <p>I am using Vagrant to manage Ubuntu instance for testing a web application. I am having trouble setting up its login page over https. As the application is using Apache2+php5+mysql. I have setup port forwarding sth like this to access the application from Host machine .</p>
  
  <p><code>config.vm.network :forwarded_port, guest: 80, host: 8080</code></p>
  
  <p>When I try to access guest using <code>http://localhost:8080</code>, it redirect to <code>https://localhost:8080</code>
    Which seams reasonable ,but the 8080 port is forwarded to http:80 guest port not to https:43.<br>
    so url <code>https://localhost:8080</code> is half true half a lie . I don't know how to forward https port to guest https port but  I wonder what will happen of <code>https://localhost:8080</code> redirect since that is not valid url is should be ( as I think ) sth like <code>https://localhost:4343</code>, if https:4343 is forwarded to guest:43. But application is not aware of the ports , it just changes <code>http</code> with <code>https</code></p>
  
  <p>(forgive me for the gibberish )</p>
  
  <p>How I setup Vagrant network setting to access guest Apache http:80 and https:43 ports. Can I assigned a static IP to guest instance and use that pleasantly . </p>
  
  <p>regards</p>
  
  <p>using:</p>
  
  <p>Vagrant version 1.1.5</p>
  
  <p>Ubuntu precise64.box</p>