Page MenuHomePhabricator

Redirecting issues Mediawiki
Closed, ResolvedPublic

Description

See example

The deployment I am linking to uses the standard container, a Caddy webserver is proxying HTTP to the exposed container ports.

The problem with my Wikibase/Mediawiki is that it is using localhost for any redirects.

The URL http://staging.catalog.rhizome.org/ should redirect to http://staging.catalog.rhizome.org/wiki/Main_Page but instead redirects to http://localhost:8181/wiki/Main_Page

The [[ https://github.com/wmde/wikibase-docker/blob/master/wikibase/1.30/base/LocalSettings.php.template | template file for LocalSettings.php ]] doesn't provide settings for the base URI and is unclear about if the container is by itself trying to find out the base URI or if this a setting that has to be provided manually.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think this ticket needs a little more explanation.

What is the issue exactly?
What is the expected behaviour?
What is the configuration of the domain?

Aklapper changed the task status from Open to Stalled.Jun 20 2018, 11:21 AM

Hi @despens, thanks for taking the time to report this!
Unfortunately this report lacks some information. If you have time and can still reproduce the problem: Please add a more complete description to this report.
That can be a clear list of specific steps to reproduce the situation, as little details sometimes matter, so that nobody needs to guess how you performed each step, describing actual results and expected results after performing the steps to reproduce, providing a link to a public website where the issue can be seen, if you see the same behavior when you are not logged in, information about your web browser(s), MediaWiki version information (if it is not on a Wikimedia wiki), etc.
You can edit the task description by clicking Edit Task.
Ideally, exact and clear steps to reproduce should allow any other person to follow these steps (without having to interpret those steps) and see the same results. Problems that others can reliably reproduce can get fixed faster. Thanks!

Please excuse, my last set of tickets was added during a Wikibase workshop.

The deployment I am linking to uses the standard container, a Caddy webserver is proxying HTTP to the exposed container ports.

The problem with my Wikibase/Mediawiki is that it is using localhost for any redirects.

The URL http://staging.catalog.rhizome.org/ should redirect to http://staging.catalog.rhizome.org/wiki/Main_Page but instead redirects to http://localhost:8181/wiki/Main_Page

The [[ https://github.com/wmde/wikibase-docker/blob/master/wikibase/1.30/base/LocalSettings.php.template | template file for LocalSettings.php ]] doesn't provide settings for the base URI and is unclear about if the container is by itself trying to find out the base URI or if this a setting that has to be provided manually.

What actually does this redirect?
I guess it is not mediawiki.

What is in the root of your webdir? is there a static file redirecting to the mediawiki index.php? Or some htaccess thing?

Vvjjkkii renamed this task from Redirecting issues Mediawiki to moaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii changed the task status from Stalled to Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from moaaaaaaaa to Redirecting issues Mediawiki.Jul 2 2018, 1:34 PM
CommunityTechBot changed the task status from Open to Stalled.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
despens claimed this task.

Mediawiki-initiated redirects have been solved by setting $wgServer in LocalSettings.php.

Apache-level redirects, as in https://staging.catalog.rhizome.org/entity/<ENTITY> still use localhost.

This seems to be caused by the .htaccess file that comes with the docker, containing

# rewrite /entity/ URLs like wikidata per
# https://meta.wikimedia.org/wiki/Wikidata/Notes/URI_scheme
RewriteRule ^/?entity/(.*)$ /wiki/Special:EntityData/$1 [R=303,QSA]

It works as soon as I set the reverse proxy to transparent. (transparent directive in Caddy.) Closing!