Topic on Project:Support desk

Gti guy25 (talkcontribs)
88.130.86.174 (talkcontribs)

The URL to your wiki must be set in LocalSettings.php (just like e.g. $wgLogo, which is also set in that file) and you can change it by setting $wgServer to another value. This will then make MediaWiki output URLs starting with the domain you want. Take care however, that Apache also needs to be configured accordingly so that it maps that domain to the webroot directory. (Don't ask me how that is done - I have no clue.)

Gti guy25 (talkcontribs)

And the Apache part is where I get stuck because I do not see where you need to edit the Apache config. I will play around some more and see if I get it. The wiki I'm working on is only a test. Thank you though.

Florianschmidtwelzow (talkcontribs)

You can edit the documenroot in the virtualhost configuration, most in /etc/apache2/sites-available. You can add the ServerName, too, to make an alias to wiki-name.domain-name.local. Be sure, that wiki-name.domain-name.local in your local DNS Server points to 192.168.x.x (the IP adress where apache is running). Https you get, when you use ssl in apache2 (and enable it for your host). Notice, that you can use a self signed certificate, when you use the wiki only locally (which i think, because you want to use a local domain), but you must add the certificate as a trusted (or add an exception in your clients, that they won't check this certificate). If you want to use the wiki on a wider range outside of your local network you can manage, then maybe it's better to use a certificate of a trusted CA (they take money ;)).

Gti guy25 (talkcontribs)

Florianschmidtwelzow: when you say I can edit the document root in the virtualhost configuration, is it the <VirtualHost *:80> OR do I add what I need under <VirtualHost> at the bottom of the "default" file inside sites-available? And by my "local DNS Server" you mean to add wiki-name.domain-name.local or the IP Address to the DNS settings in Active Directory or something like that, correct? Sorry to be such a newbie, this is a project that was assigned to me at work and I am not a programmer nor do I know anything about Linux stuff.

Maybe this will help you more, this is exactly what I see when I am in /etc/apache2/sites-available/default:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

I know that I need to change one of these AllowOverrides None to AllowOverride All but not sure which

Maybe you can show me what it should look like when it's done?

Anything would be a great help. In the meantime, I will add the appropriate DNS entry.

Gti guy25 (talkcontribs)

Florianschmidtwelzow: I just added the DNS record, and was able to ping my wiki server by name. Then I opened up IE and browsed to wiki-name.domain-name.local/mediawiki/index.php and it brought me right to my wiki page. Now, my question is how can I get it to just say: wiki-name.domain-name.local/index.php/Main_Page? Do I still need to edit the default file? If so please proceed to respond to my last post, if not please let me know how if you can. Thank you.

Florianschmidtwelzow (talkcontribs)

Hello! You have to edit the file, where you entered the host configuration :) If this is the file you posted in your post, then change DocumentRoot /var/www to DocumentRoot /var/www/mediawiki and <Directory /var/www/> to <Directory /var/www/mediawiki/>. Restart/reload the server settings and navigate to your wiki. In order to use (maybe you want) short URL you can change AllowOverride in the directory section(<Directory /var/www/>) to All, or add the rewrite rules directly in the host configuration and leave allowoverrides to none.

Ciencia Al Poder (talkcontribs)

You may need to adjust $wgScriptPath in your LocalSettings.php to reflect the new directory structure:

$wgScriptPath = '';
Gti guy25 (talkcontribs)

I have tried everything, I just can't get make it so that the url just reads "athena.my-domain.local". (Athena is my wiki's name). I added the proper DNS settings in my Domain Controller as well so that the Server itself can be resolved by name.

Maybe I did this all wrong from the begining so if anyone can clarify for me if what I did was right or wrong:

When I downloaded Mediawiki, it was placed in the directory /home/mhtadmin/mediawiki-1.23.1.tar.gz then I decompressed the file and it remained in the same directory but was then called "mediawiki-1.23.1 then I renamed the file to just "mediawiki" and moved it (and all of its contents) to /var/www/ because I thought that's what I was supposed to do since /var/www/ is where index.html is. The directory is now /var/www/mediawiki. I then moved the LocalSettings.php into /mediawiki where it needed to be. At this point I was able to access my wiki page but now the URL reads "http://ip-address/mediawiki/index.php'' or I can browse to it by typing in "athena.my-domain.local/mediawiki/index.php" but when I log in it goes back to the IP address URL.

The directions on the mediawiki website on how to create a Short URL for Apache talk about "/w" and "/wiki" directories, I do not have these. This is frustrating me to say the least.

Can anyone help me? Please don't be vague in descriptions, be as specific and detailed as possible. I just wanna get this thing fully working :?(

Ciencia Al Poder (talkcontribs)

You need to change $wgServer to use the domain name and not the IP.

If your wiki is installed in /var/www/mediawiki and you have mydomain/mediawiki in the URL and want to remove "mediawiki" from the URL, just move all files and folders from inside "mediawiki" to /var/www/

You'll need then to adjust $wgScriptPath as I said before.

Gti guy25 (talkcontribs)

Ciencia,

Thank you, and I had thought of this but did not try it. I will let you know how it works out. Thank you

Reply to "mediawiki URL"