1

I am using my apache as a reverse proxy for a few requests to a webserver running on an internal port to allow access via my regular virtual host. This is on an ubuntu 15 running in vagrant.

Here's my virtualhost config:

<VirtualHost *:80>
  DocumentRoot /vagrant/htdocs
  ServerName test.vm

  # proxy pass mailcatcher to internal webserver
  <Location /mailcatcher>
    ProxyPass http://localhost:1080
    ProxyPassReverse http://localhost:1080
  </Location>
  <Location /assets>
    ProxyPass http://localhost:1080/assets
  </Location>
  <Location /messages>
    ProxyPass ws://localhost:1080/messages
    ProxyPassReverse http://localhost:1080
  </Location> 

  <Directory />
    Require all granted
  </Directory>

  <Directory /vagrant/htdocs>
    AllowOverride all
  </Directory>
</VirtualHost>

For a while, this works fine. However, after a time, suddenly all requests to this virtualhost are proxied to the internal webserver. So if I call http://test.vm/cron/mails.php at first it will run mails.php as expected. However after a random amount of time or event, suddenly the aforementioned URL will start serving responses from Mailcatcher.

The message you were looking for does not exist, or doesn't have content of this type

This is a Mailcatcher error that you get when you request a message that no longer exists.

This service, Mailcatcher, is started with my VM and runs all the time. The weird thing is, I don't experience this issue when I am doing other stuff on the VM (there's a web app running on it). Only when I am actively debugging mails and using the Mailcatcher gui am a I suddenly sometimes experiencing this.

Waiting for a while or restarting apache "solves" this issue until it pops up the next time. Can anyone help me out on this? Did I set up my proxy wrong?

Thanks.

Christof
  • 121
  • 3

0 Answers0