https://bugzilla.wikimedia.org/show_bug.cgi?id=52400

       Web browser: ---
            Bug ID: 52400
           Summary: Sub Directory Reverse Proxy breaks links
           Product: MediaWiki
           Version: 1.21.1
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

This may or may not be a bug, but I did notice an issue when mediawiki can be
set up to be accessed from server directly as well as from a reverse proxy
subdirectory.


The set up is as follows:

Requests made to https://portal.mydomain.com/subdirectory (handled by a reverse
proxy server) makes a backend connection (also over https) to a load balancer
(mylb.mydomain.com), which directs the request to the primary webserver
(s1.mydomain.com) or failover webserver (s2.mydomain.com).

Mediawiki can be accessed via https://lb.mydomain.com/wiki. 
Mediawiki config variables:
$wgServer = "https://mylb.mydomain.com";
$wgScriptPath = "/wiki";
$wgArticlePath = "/wiki/$1";

When accessing the wiki from the load balancer URL, everything appears fine.
There are no broken links.

From the reverse proxy url https://portal.mydomain.com/subdirectory/wiki, the
wiki loads mostly everything.
e.g.:
https://portal.domain.com/subdirectory/wiki/Main_Page (Returns 200)
https://portal.domain.com/subdirectory/wiki/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&*
(Returns 200)


However, some of the application is attempting to access the following URL
https://portal.mydomain.com/wiki/. Requests made to that subdirectory on the
reverse proxy would not be forwarded to our server and thus 404. I see requests
these in firebug.
e.g.:
https://portal.mydomain.com/wiki/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20130625T191716Z
https://portal.mydomain.com/wiki/skins/common/images/mediawiki.png

I'm not sure if this is an issue with mediawiki or maybe my configuration.

I believe I could change the mediawiki variables to:
$wgServer = "https://portal.mydomain.com";
$wgScriptPath = "/subdirectory/wiki";
$wgArticlePath = "/subdirectory/wiki/$1";

but then I am pretty sure attempting to access it via the load balancer
directly would not work properly. 

The reverse proxy should mask the server, and the application should not have
to be configured to know the reverse proxy URL. I believe it should be
transparent.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to