From: "Rowan Collins" rowan.collins@gmail.com
On Apr 11, 2005 10:19 PM, Byortek wiki wiki@byortek.com wrote:
When the browser calls smallpc.dyndns.org/wiki, somehow mediawiki tells the browser (through apache) to redirect (status 301) the call to the private url smallpc.home/wiki
Aha; I think you need to add a line in your "LocalSettings.php" file defining $wgServer; otherwise it will be automatically detected each time from the apache settings (I think). e.g.
$wgServer = "http://smallpc.dyndns.org";
It's not working if the hostname remains a private url. The final adress will be the $wgServer adress but in between the apache will redirect to the private url. So, the public client cannot access the wiki because it can't reach the in-between private adress.
I've made a test, see below.
You'll see that when the client requests the public adress (smallpc.dyndns.org), the apache server redirects it to the private adress (smallpc.home) and, on next call, redirects it to the public adress (smallpc.dyndns.org) !!!
There's two apache redirections !!
Here are the configuration and the trace dump:
-- configuration -- private url of the server: smallpc.home public url of the server: smallpc.dyndns.org apache server on port 8081 linux server hostname: smallpc.home $wgServer = "http://smallpc.dyndns.org:8081"; ------------
Here is the simplified etherreal trace dump of a private client http request: browser adress: http://smallpc.dyndns.org:8081/wiki C = Client S = Server C->S GET /wiki HTTP/1.1 Host: smallpc.dyndns.org:8081 S->C HTTP/1.1 301 Moved Permanently <blah blah> Location: http://smallpc.home:8081/wiki C->S GET /wiki HTTP/1.1 Host: smallpc.home:8081 S->C HTTP/1.1 301 Moved Permanently <blah blah> Location: http://smallpc.dyndns.org:8081/wiki/index.php/Accueil C->S GET wiki/index.php/Accueil HTTP/1.1 Host: smallpc.dyndns.org:8081 S->C <the wiki page ...> ------------
Finally it works if I set the hostname to a public adress. However I'm still concerned because I wonder how it will behave in a shared hosting environment. If I cannot change the hostname, I may not be able to host my wiki ....
Thanks for help Eric