Freepbx Admin Page with Firefox via Proxy Problem

I have a problem with multiple versions of Freepbx when trying to do a reload on the admin page. The problem only happens with Firefox when it has a Proxy configured. If I use Firefox without a Proxy it works fine. Internet Explorer works fine with or without the same proxy. I have tried multiple versions of Firefox 3.X with the same result. If I go back to Firefox 2.0 all works well.

The error I get is “Error: Did not receive valid response from server”.

I have tested Freepbx versions 2.3.1, 2.4, 2.5 all with the same result. Tried it from 3 different PCs (XP, Vista, and Windows 7).

I am pretty sure the problem lies with the Freepbx javascript that is unable to handle the response code from Firefox when Proxy is enabled.

Can anybody help?

Thanks,
Ricardo

To little information.

What version of FreePBX?
Is this a distro or did you set up the system yourself?
What version of Linux?
What version of apache?
Do you use http:// or https://?

Here are the answers:

What version of FreePBX?
I have tested 3 versions: (2.3.1, 2.4.0, 2.5.2)

Is this a distro or did you set up the system yourself?
Trixbox Distros (2.4.2,2.6.0.7,2.8.0.4)

What version of Linux?
Centos 5.0, 5.1 , and 5.5

What version of apache?
Server version: Apache/2.2.3

Do you use http:// or https://?
http://

Can somebody test this out and let me know if you can reproduce it?
It is very simple.

  1. Use an existing FreePBX installation on your network
  2. Use an existing Apache Server in your network and enable Proxy by modifying its httpd.conf like this:
    ProxyRequests On
    <Proxy *>
    Order deny,allow
    Deny from all
    Allow from 192.168.0.0/255.255.0.0 (or whatever your network is)
  3. Use a PC with Firefox 3.X and enable Proxy Settings to point to the Apache Proxy
  4. Access FreePBX from the PC and make some change wich requires a reload.
    (PC machine-> Apache Proxy machine-> FreePBX machine)

Thanks,
Ricardo

OK, trixbox, not a very good distro IMHO.
The versions of FreePBX that you mention above (2.3.1 and 2.4.0) are “real” FreePBX versions, but they are out of official support. There will be nothing fixed on these versions except really critical security fixes.

As for version 2.5.2, that version is in trixbox distro 2.8.0.4. That version is in reality a “forked” version called 5.5.2, and what trixbox have done to that “forked” version I don’t know and I really don’t care as they wont contribute back the changes to the community.

My suggestion is that you test this with a real distro like PBX in a Flash, AsteriskNOW or Elastix as they use real version of FreePBX and they have a great knowledge of how to set up distros that work out of the box. Remember to update FreePBX to a supported version before testing so that you are on at least version 2.7.

If you can replicate this in a supported version of FreePBX that is not on trixbox I would be more than happy to help you, but for now, I am sorry, I won’t be able to help. Please ask in the trixbox forums.

Supported version of FreePBX are 2.7 and 2.8

If I was to venture a guess it has something to do with the Apache setup in trixbox. Very little was actually done (beyond cosmetic) by the “team” over at trixbox that now consists of one guy and he has other duties.

However, in the day much was done to the httpd.conf filegoing back to AAH days. Take a look at the includes to trixbox.conf, though mostly authentication related it may be the issue.

I have just tested it, one server at 192.168.0.231, enabled proxy as per your instruction. Other server with FreePBX 2.8.0.3 at 192.168.0.236.

Using both IE7 and FF 3.6.9, set proxy to 192.168.0.231, tested to reload on 192.168.0.236 server, no problems with either FF or IE.

CentOS 5.5 with apache 2.2.3, both distro in this case is Fonicaprojects

OK, I will download a FreePBX supported version and install it in a new machine. I will report back on the results shortly.

I downloaded and installed Freepbx 2.8.0 on a new machine but the problem was identical. I could not reload with Firefox 3.6.10 via an Apache 2.2.4 Proxy but Internet Explorer 8 worked fine.

Since Mikael Carlsson said it worked fine for him I went digging into the Apache Proxy config. It turns out it had a security module called “mod_security” and one of its directives was:
SecFilterSelective HTTP_Content-Type “!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)”

After getting rid of that directive everything worked well. I am not sure why it had that in.

Thanks for taking the time to test it Mikael.