Jump to content

MediaWiki Problem


PeterPanic
 Share

Recommended Posts

Hi all!

I'm desperate. Installed Mandrake 10.1OE with Apache2. LAN works fine. Then installed phpBB2 with mySQL. No problem at all. Can use the Forum from the whole LAN at 192.168.1.* and on the Linux Machine from 192.168.1.31 (the Linux Machine) and 127.0.0.1.

 

Now I installed (untarred) mediawiki-1.4.5.tar.gz (the Engine that runs Wikipedia.org) from http://sourceforge.net/projects/wikipedia/

 

Not much instruction is given, people from the whole world say it runs without problems.

 

I entered the correct settings, the config is created, the mySQL DB is filled (!) and I move the LocalSettings from config/ to ./ ... When I open the page from the LAN (WinXP with Firefox) it tries to connect, and says that 127.0.0.1 refused the connection. I don't want it to connect to 127.0.0.1, but to 192.168.1.31! I entered that.

 

Locally (Konqueror on Linux) it runs fine (with all the links pointing at 127.0.0.1, which is OK on the Server)

 

(EDIT:)

I now tried the brand new Version 1.5ß - with the same result. I guess I'm doing something wrong - but what?

 

Hope someone can help me.

 

Bye.

 

Peter

Edited by PeterPanic
Link to comment
Share on other sites

Just a guess...

 

WikiMedia thinks that its running on a site called localhost or 127.0.0.1, maybe that is the default. When you try to login it refers you back to its main page, which is going to be http://127.0.0.1/wiki/ most likely. This means it tells your browser to look up the page on the machine it is running on, obviously in the special case that the browser is running on the same machine as wikimedia this works.

Try going through all WikiMedia's settings and seeing if there is an option to change the hostname or ip it thinks its running on, from say localhost/127.0.0.1 to the computers eth0 ip address. Better still, get a domain name.

 

fissy

Link to comment
Share on other sites

WikiMedia thinks that its running on a  site called localhost or 127.0.0.1, maybe that is the default.

 

Meanwhile I found out that it uses the hostname (of the shell command "hostname") to generate its links. And as I didn't have one (used IP only) it used "localhost" as the default hostname. This was resolved on the client to 127.0.0.1 ... I didn't manage to establish a working DNS till now so i just set the hostname (!) to the string "192.168.1.31" which is the IP of the server. Now the links are resolved to "http://192.168.1.31/wiki/..."

But that's just a trick and when my IP changes I'll have to change the hostname. The problem with DNS: I should not use my Linux PC as a DNS Server (named/bind), as the whole Network in this company runs with Windows without problems and the Win-Admin fears that the Win-PCs could have problems as soon as the Linux box starts acting as a DNS server.

In the Windows LAN there seems to be no DNS server (only the one of the DSL-ISP, which can't resolve my hostname)

 

Question: How do I make the Win-PCs find my Lin PC via the hostname in my LAN? The Win-PCs seem to resolve their names via Samba (nmbd) protocol.

 

Of course I could edit the hosts-file on every PC to find my machine, but again: When my IP changes (DHCP), I'd have to edit host-files on 20 PCs...

 

Any ideas?

 

Cya.

Panic.

Link to comment
Share on other sites

my suggestion would be to get a free hostname from someone like dyndns.org

Its not so professional as your own name but you could have something like panicsputer.ath.cx for free. Its also very easy to use and there are linux clients to update your ip with dyndns if it changes.

Link to comment
Share on other sites

I don't know if you got me right: I'm running the Apache-Server on a (local) LAN...

And the Windows-PCs in the same LAN should open the Apache-Pages when I enter the hostname of the Linux Box in the Browser's adress bar. It only works when I enter the IP.

And the Mediawiki Software uses absolute links which link to the "hostname" of the Linux PC. So when the WinPCs access the Wiki via IP and open a linked page, their PCs try to open "http://linuxbox/wiki/....", but "Linuxbox" isn't found/resolved in the LAN.

 

Thanks for your time.

 

Panic.

Link to comment
Share on other sites

If you don't have a DNS server that knows your box is called "linuxbox", then the windows clients won't be able to resolve the domainname. You could add the IP address with a hostname to the hosts file in windows - but if your IP changes you'll have to go back and change it.

Link to comment
Share on other sites

I don't know if you got me right: I'm running the Apache-Server on a (local) LAN...

And the Windows-PCs in the same LAN should open the Apache-Pages when I enter the hostname of the Linux Box in the Browser's adress bar. It only works when I enter the IP.

And the Mediawiki Software uses absolute links which link to the "hostname" of the Linux PC. So when the WinPCs access the Wiki via IP and open a linked page, their PCs try to open "http://linuxbox/wiki/....", but "Linuxbox" isn't found/resolved in the LAN.

the dyndns service works fine for resolving lan ips, i've been using it for the last 2 years.

 

you sign up, choose a name, eg linuxbox.dyndns.org, then tell dyndns that the ip of linuxbox.dyndns.org is 192.168.1.blah.

 

Your windows clients will question the dns server to find out the ip of linuxbox.dyndns.org which will then ask dyndns, which will reply with 192.168.1.blah. All thats necessary is an internet connection, otherwise you have to set up your own dns server or use the hosts file.

Link to comment
Share on other sites

the dyndns service works fine for resolving lan ips, i've been using it for the last 2 years.

(...)

Your windows clients will question the dns server to find out the ip of linuxbox.dyndns.org which will then ask dyndns, which will reply with 192.168.1.blah. All thats necessary is an internet connection, otherwise you have to set up your own dns server or use the hosts file.

 

Wow! Right. I didn't think that far. Thanks. Of course... Has to work...

 

 

why would anyone use a DHCP LAN assigned IP for any type of server ?

 

1) Because the LAN with 30 Win98/XP-Clients runs fine with DHCP dynamic IPs for over a year and I don't want to mess it all up with my "new" Linux box having one single static IP

2) Because a dynamic IP is less likely to get hacked as it changes e.g. every day.

3) Because I'm just testing the server and don't want to make big changes/efforts/costs as long as I'm not absolutely sure about what I'm doing in the end.

4) Why not? Not everyone does everything as you do. That's part of the spirit of Linux - freedom of choice.

 

 

If you don't have a DNS server that knows your box is called "linuxbox", then the windows clients won't be able to resolve the domainname. You could add the IP address with a hostname to the hosts file in windows - but if your IP changes you'll have to go back and change it.

 

Oh, yes... Meanwhile I found out that obviously Windows uses WINE / NetBIOS for LAN name resolution while the Internet and lots of Linux PCs use DNS / bind / named (some Linux PCs use NIS) And they are not interoperable / compatible...

 

So all Win PCs know the names of all other Win PCs (perhaps nmbd of Samba will tell the Lin name to the Win PCs...) and only know the Lin name if it's in the hosts-file or IF you have a DNS-Server set up (like dyndns, or a local Linux DNS server or (perhaps works) a Win 200x DNS server...)

 

I had just thought the Fortigate-Firewall (which is based on Linux) which also does the DHCP will do DNS, too, but it doesn't... So I'll set up a bind9-Server on my linux box and hope that this won't mess up the Names in the LAN... :-) First I'll try the dnydns thing.

 

Thanks for your help. Perhaps anyone has further ideas.

 

See You.

Panic.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...