Page MenuHomePhabricator

Using Mediawiki behind a reverse proxy
Closed, InvalidPublic

Description

Hi,

I must access to my installed mediawiki via https://redfish05401.lesidc.com. This URL goes to my reverse proxy.
My Reverse proxy communicate to my mediawiki server via http://redfish05401.**svlidc**.com.

I see I can't update a new image file because the generated URL si wrong:

pasted_file (798×624 px, 405 KB)

Howerver, others generated URL are right. Example:

pasted_file (883×591 px, 92 KB)

  1. How can I resolve this bug with my existing version Mediawiki 1.27.0 ?
  2. Could you plan to fix this bug in your next release ?

Best Regards.
Boris Sanègre - IT Manager.
AGIS-SAS - France

Event Timeline

Reverse proxies Are supposed to rewrite all URLs in links from the internal URL to the external one.

What reverse proxy software are you using? Is it properly configured to do such rewrites?

You probably need to set $wgServer = 'https://redfish05401.lesidc.com'; in your LocalSettings.php.

Thanks for reporting this.

Is this potentially related to T54400: Sub Directory Reverse Proxy breaks links?

I have read this post 54400 before to write this 144397.
I'm enought specialist to say it's the same issue.
It seemes to be the same domain et maybe the same origin, but not exactly my anomaly.

Perhaps, when you will solve my issue, you will solve this T54400.

Reverse proxies Are supposed to rewrite all URLs in links from the internal URL to the external one.

What reverse proxy software are you using? Is it properly configured to do such rewrites?

We are using Apache Web server 2.2.22-13 (Debian Wheezy) with native module called "proxy".
We don't rewrite URL --> don't modify anything.
We just transfer client request.

Extract of our current VirtualHost config on my reverse-proxy.

<VirtualHost *:443>
        //[...]//
        ProxyRequests Off
        ProxyVia On
        ProxyPreserveHost Off
        ProxyPass / http://redfish05401.svlidc.com/ nocanon
        ProxyPassReverse / http://redfish05401.svlidc.com/
</VirtualHost>

You probably need to set $wgServer = 'https://redfish05401.lesidc.com'; in your LocalSettings.php.

Tanks you. It's work fine !

Extract of my LocalSettings.php:

## The protocol and server name to use in fully-qualified URLs
### Version without ReverseProxy
#$wgServer = "http://redfish05401.svlidc.com";
### Version with ReverseProxy
$wgServer = "https://redfish05401.lesidc.com";
InformatiqueAgis claimed this task.

The Matmarex's answer solved this T144397 et T144383 too.

Aklapper changed the task status from Resolved to Invalid.Sep 1 2016, 9:06 AM

Setting status to "Invalid" because this was a configuration issue and no change in the code repository was needed.