# Mediawiki and Apache reverse proxy [SOLVED]

## cantao

Dear friends:

I digged through Mediawiki's bugzilla and Apache's mailing lists with no luck.

Thanks to the amazing Gentoo Apache configuration scheme and webapp-config (I really love them), I've managed to do the following setup:

Machine A is connected to the Internet, real IP address with four virtual hosts: www (Drupal), email (Squirrel), egroupware and a wiki. The wiki is reverse proxied to machine B. Email, egroupware and wiki are forced into SSL (https) and run directly on machine A.

Machine B has a 192.168.*.* address, so it's inside the Intranet. It has MySQL and the Mediawiki installation only (single host).

Both machines have mod_security installed.

All services on Machine A are working flawlessly and smoothly. The reverse proxy is working fine also, except for two little annoying things:

1. If I try to edit a long article on the wiki via the proxy (for instance, if I am at home), the content is simply ignored -- it is erased, indeed. I can't preview it. I can't save it. 46 lines on Firefox is the limit. About 120 lines on Konqueror. If the article is smaller than that, everything runs just fine.

2. I can't upload pictures to the wiki (double checked all PHP configurations that could be limiting this).

Inside the Intranet (bypassing the proxy) all the features work as they are supposed to do. I can upload the pictures and edit long articles as I wish, which brings me to the conclusion that the problem is with the reverse proxy.

Apache logs, even in debug mode show no problems. Everything seems to be ok, with requests passing between the machines.

I am completelly clueless here... I don't even know *how* to debug this thing  :Smile:  And I am pretty sure is some stupid little thing that has escaped from my tired eyes...

Thanks a lot in advance, Cantão!Last edited by cantao on Fri May 26, 2006 6:28 pm; edited 1 time in total

----------

## Janne Pikkarainen

mod_security has caused some troubles me in the past. Have you tried to (temporiraly) disable it to see that it's not the reason?

----------

## cantao

Hum... Good idea... Indeed, I just remembered of mod_security when I was posting, but I've had no chance to test it yet (just on weekends, when no one is using the system).

I'll give it a try as soon as possible and post the results!

Great hint!

Thanks a lot, Cantão!

----------

## cantao

Yeah, no luck disabling mod_security... Same behavior. Grunf   :Mad: 

Cheers, Cantão!

----------

## cantao

Well, after a lot of digging, it seems to be an Apache bug, specifically from version 2.0.55:

http://issues.apache.org/bugzilla/show_bug.cgi?id=37145

Apache's mod_proxy kills anything larger than 8kb when moving content from the frontend server to the backend server.

I'll try 2.0.58 as soon as possible to see if it solves the problem.

Cheers, Cantão!

----------

## cantao

Yep, confirmed. Everything working smoothly now  :Smile: 

----------

