Page MenuHomePhabricator

Redirected to "default" after saving page
Closed, ResolvedPublic

Description

Author: brian

Description:
I tried searching for a similar bug but could not find it.
Searched in the MediaWiki code and could not find what the problem is so decided
to post it here, maybe more people are having the same problem.

I did a normal install, like described.

After the install i wanted to visit the wiki but when entering the url i was
redirected to just "default" ( tried it in several browsers and computers ). (
link: http://212.32.243.132/wiki/index.php )

Als when wanting to save an edited page the same happens, but the changes i made
are first saved.

Browsing the Wiki gives no problem so far i can see...

Any ideas?

MediaWiki is installed on a FreeBSD machine.


Version: 1.4.x
Severity: normal
OS: FreeBSD
Platform: PC
URL: http://212.32.243.132/wiki/index.php/Hoofdpagina

Details

Reference
bz1749
TitleReferenceAuthorSource BranchDest Branch
Bump to 0.3.154repos/search-platform/flink-rdf-streaming-updater!26dcaussebump-to-0_3_154main
Bump to 0.3.154-82c97965 (snapshot)repos/search-platform/flink-rdf-streaming-updater!25dcaussebump-to-0_3_154-82c97965main
Bump to 0.3.153repos/search-platform/flink-rdf-streaming-updater!24dcaussebump-to-0_3_153main
Bump to 0.3.152repos/search-platform/flink-rdf-streaming-updater!23dcaussebump_to_0_3_150main
Fixed a few minor issuesrepos/data-engineering/mpic!162sfacifix-copy-issuesmain
Update sampling fieldsrepos/data-engineering/mpic!141phuedxwork/phuedx/T374957main
Remove NS and SOA recordsrepos/cloud/cloud-vps/tofu-infra!136fnegriT374953-2main
Import DNS records for db.svc.wikimedia.cloudrepos/cloud/cloud-vps/tofu-infra!135fnegriT374953main
Bump to 0.3.150repos/search-platform/flink-rdf-streaming-updater!22dcaussebump-0.3.150main
Add /mediawiki/wikibase/entity/rdf_change/2.0.0repos/data-engineering/schemas-event-primary!6dcausserdf-change-change-T374918master
builds-api: bump to 0.0.173-20241003135043-0a8f9093repos/cloud/toolforge/toolforge-deploy!547ghostbump_builds-apimain
builds-builder: upgrade tektonrepos/cloud/toolforge/toolforge-deploy!531dcaroupgrade_tektonmain
Draft: scap installer: split Python requirements into "common" and "deploy"repos/releng/scap!455jnucheT374983master
Fix dag namerepos/data-engineering/airflow-dags!842brouberolT374948-fixmain
test_k8s: define a dag that streams logs for a minuterepos/data-engineering/airflow-dags!841brouberolT374948main
Add /mediawiki/wikibase/entity/rdf_change/2.0.0repos/data-engineering/schemas-event-primary!2dcausseT374918-mediawiki_wikibase_entity_rdf_changemaster
all: upgrade to tekton 0.59.X LTSrepos/cloud/toolforge/builds-api!111dcaroupgrade_tektonmain
Show related patches Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:17 PM
bzimport set Reference to bz1749.
bzimport added a subscriber: Unknown Object (MLST).

What does 'to "default"' mean?

Linked URL appears to be offline, so cannot test.

Ensure that Apache's ServerName directive is not incorrectly set.

brian wrote:

Sorry, link is online again:

This is the Header information.
You can see, it is forwarden to Location: http://default/wiki/index.php/Hoofdpagina
This schould be Location: http://212.32.243.132/wiki/index.php/Hoofdpagina


http://212.32.243.132/wiki/

GET /wiki/ HTTP/1.1
Host: 212.32.243.132
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)
Gecko/20050317 Firefox/1.0.2
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Sat, 26 Mar 2005 20:05:38 GMT

HTTP/1.x 301 Moved Permanently
Date: Sat, 26 Mar 2005 20:05:54 GMT
Server: Apache/1.3.29
Vary: Accept-Encoding,Cookie
Expires: -1
Cache-Control: private, must-revalidate, max-age=0
Last-Modified: Sat, 26 Mar 2005 20:05:55 GMT
Location: http://default/wiki/index.php/Hoofdpagina
Content-Encoding: gzip
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

You probably want to enter the IP address in the ServerName directive
of your Apache configuration.

$ /etc/apache/httpd.conf
ServerName 212.32.243.132

Mediawiki 1.4 rely on the following code to detect your hostname:

--------8<----------------------------------------
if( isset( $_SERVER['SERVER_NAME'] ) ) {

$wgServerName = $_SERVER['SERVER_NAME'];

} elseif( isset( $_SERVER['HOSTNAME'] ) ) {

$wgServerName = $_SERVER['HOSTNAME'];

} else {

  1. FIXME: Fall back on... something else? $wgServerName = 'localhost';

}
--------8<----------------------------------------

Maybe it got set as "default".

brian wrote:

Thank you, that seemed to be the problem!

Works fine now.

Much thanks!