Red Hat Bugzilla – Bug 246140
mediawiki.conf not included in package
Last modified: 2009-07-26 17:06:54 EDT
Description of problem:
When installing mediawiki.1.9.2, the apache configuration file
(/etc/httpd/conf.d/mediawiki.conf) is not included.
Version-Release number of selected component (if applicable):
1.9.2 / 33.fc7
Each and every time
Steps to Reproduce:
1. yum install mediawiki
2. rpm -ql mediawiki | grep /etc
nothing got installed to /etc
mediawiki.conf exists in CVS. mediawiki is installed to /var/www/wiki, but
mediawiki.conf in CVS references /var/www/mediawiki.
See this message for more info:
What do you require /etc/httpd/conf.d/mediawiki.conf for? The layout has changed
with most parts of mediawiki living under /usr/share now (inaccessible for
direct web requests), so all the deny statements are not needed.
Actually the old mediawiki.conf has a local exploit security issue which you
don't really want back.
One thing that is required for mediawiki.conf is:
Alias /wiki /var/www/wiki
It seems that the default DocumentRoot for apache is /var/www/html. So, you
need the alias to direct the webserver to /var/www/wiki for requests for /wiki
(since its not part of the DocumentRoot.)
That Alias by itself will be enough to configure the site. Whether there are
more directives that need to go in, I'm not sure.
I agree with Michael.
I think the /etc/httpd/conf.d/mediawiki.conf should be included with the
package, with only the alias directive ; or wiki directory placed under
/var/www/html and not /var/www.
The goal is users can set up a mediawiki with a simple 'yum install' and nothing
Created attachment 172413 [details]
I have not personally tested this conf file. I think it should solve the
problem highlighted by this bug.
One can either have
* a single mediawiki instance, then a mediawiki.conf picking up that special
instance would be fine, or
* several (0 to N) instances, where a mediawiki.conf makes less sense
The code that Fedora ships allows for multiple mediawiki setups.
> The goal is users can set up a mediawiki with a simple 'yum install' and nothing
> else specific.
That also can't be done with security in mind, installing mediawiki will neither
start mysql behind the user's back, nor autoconfigure to allow external access
be that read or read/write, lest to speak about seting WikiSysOp credentials and
the like. Similar to http's or ftp's setup, yum install foo will have to be
followed by further configuration steps. For mediawiki even more so than for the
other mentioned examples since mediawiki requires you to setup its root user.
Also Fedora can't dictate what URL/paths a mediawiki should use. A
mediawiki.conf would enable mediawiki as a subdir on all virtual hosts, not
something a typical web admin will want to do.
Michael, a simple alias does not solve the problem.
I have a single installation, so your .conf file should does the trick... but it
The wiki works, I should install it, but skins (and images) are not ok.
I've tried several values for $wgStyleDirectory and so on, nothing works. It
tries to load http://localhost/mediawiki/skins wich does not exists...
The alias should point to /usr/share/mediawiki and not /var/www/wiki.
I'm happy to resubmit the mediawiki.conf file if it would be used by anyone. I
ended up just downloading a tarball from upstream (ie, Mediawiki.org).
My real issue was that after running yum install mediawiki, it wasn't clear what
had been done and what still needed to be done.
I think you can follow my line of reasoning if you look at the linked message in
the original bug report. It seems like the package maintainer wants to ignore
this, and I can understand that. There is no perfect solution, but that is due
more to the nature of mediawiki.
Hum... in this case, SELinux is not happy...
I'm going to install the 1.10.1 from the 'sources' also.
I'm just upgrading from FC6 where mediawiki worked like a charm, and now, I
really don't understand how to properly reinstall it...
The solution to put /usr/share/mediawiki in the .conf file causes problems with
Thanks for the help, anyway.
The current package in rawhide has some package specific documentation and sample configuration. Some wrong dependencies for minimal (mathless) installations have been fixed as well. From the changelog:
- Add a README.RPM and a sample apache mediawiki.conf file.
- All (runtime) dependencies from mediawiki need to move to
Please check if the issues are ironed out and reopen if not. The package in rawhide may further change before F12 to address bug #463784.