title: 504 Gateway Time-out when trying to login to laravel project
body: <p>I have a laravel v5.2 project, My pc environment is ubnuntu (host)</p>
  
  <p>The project is on vms, the vm configuration is like below : </p>
  
  <p>There is an haproxy to load two relplica sets which they are also ubuntu vms.</p>
  
  <p>project is on my pc home directory which I've shared it over this replica sets. 
  Each requests goes to haproxy and then it will load balance requests to those two replica sets. </p>
  
  <p>haproxy network configuration is bridge (static ip) to be reachable to other users in the network. </p>
  
  <p>those two replica sets network configurations are NAT for talking to haproxy only.</p>
  
  <p>I had no problem using this configuration but after I change my internet connection of my pc I can't login to my project any more while I updated all ip address's and configurations, and when I try to login to my project I get : </p>
  
  <pre><code>504 Gateway Time-out
  
  The server didn't respond in time.
  </code></pre>
  
  <p>The strange part is When I try to reach for example user info with manually created token : there is no problem and I can get user info data or any other routes data. </p>
  
  <p>The problem is just <strong>login,register routes</strong>. which I didn't have this problem when I was using my previous internet connection. </p>
  
  <p>I describe my vm and network configurations below : </p>
  
  <p>My pc(host) network configuration : </p>
  
  <pre><code>source /etc/network/interfaces.d/*
  
  # The loopback network interface
  auto lo
  iface lo inet loopback
  
  # The primary network interface
  auto eno1
  iface eno1 inet static
          address 192.168.30.245
          netmask 255.255.255.0
          network 192.168.30.0
          gateway 192.168.30.1
          dns-nameservers 8.8.8.8
  </code></pre>
  
  <p>My pc(host) /etc/hosts : </p>
  
  <pre><code>192.168.30.236  api.project.local
  </code></pre>
  
  <p>The HAproxy vm network : </p>
  
  <pre><code># The loopback network interface
  auto lo
  iface lo inet loopback
  
  # The primary network interface
  auto eth0
  iface eth0 inet static
  
  address 192.168.30.236
  netmask 255.255.255.0
  network 192.168.30.0
  broadcast 192.168.30.255
  gateway 192.168.30.1
  
  auto eth1
  iface eth1 inet static
  
  address 192.168.100.113
  netmask 255.255.255.0
  network 192.168.100.0
  broadcast 192.168.100.255
  gateway 10.0.2.15
  </code></pre>
  
  <p>The Replica set A network : </p>
  
  <pre><code># The loopback network interface
  auto lo
  iface lo inet loopback
  
  # The primary network interface
  auto eth0
  iface eth0 inet dhcp
  
  auto eth1
  iface eth1 inet static
  
  address 192.168.100.110
  netmask 255.255.255.0
  network 192.168.100.0
  broadcast 192.168.100.255
  gateway 10.0.2.15
  </code></pre>
  
  <p>The replica set B network : </p>
  
  <pre><code># The loopback network interface
  auto lo
  iface lo inet loopback
  
  # The primary network interface
  auto eth0
  iface eth0 inet dhcp
  
  auto eth1
  iface eth1 inet static
  
  address 192.168.100.110
  netmask 255.255.255.0
  network 192.168.100.0
  broadcast 192.168.100.255
  gateway 10.0.2.15
  </code></pre>
  
  <p>Mysql and mongodb servers are on my local pc(host) which it's ip is : <code>192.168.30.245</code></p>
  
  <p>And as I said there is no problem connecting to mysql or mongodb servers from other <code>routes</code> or <code>artisan tinker</code></p>