httpd: Too many config files?
I'm not sure if this is specifically a Fedora 6 problem, but I keep banging my head at it: apache, mediawiki.
I ran into a bunch of problems when I decided to convert a larger document I'm working on (text book like writing with lots of math) into the wiki media format, so I can make it later public. I thought it would be easy to set things up, after reading in the O'Reilly book on Fedora linux (mainly fedora 6) by Chris Tyler about setting up apache and mediawiki. It was fairly easy to get apache to work as a start, but then I seem to be unable to do anything with it. In particular for the mediawiki part: Fedora 6 installs it in /var/www/mediawiki. It is then, if apache is running, available as http://localserver/mediawiki. However, there is no way to get to configure it, which should be done following the link on the start page for mediawiki. Even after following meticulously the steps outlined in the book on apache, I can't access anything in the mediawiki diretory via http. Now I have a few suspicions: First of all, it is noticable that there are more config files in the whole apache bag than one can usually handle. So, to start, there is a directory /etc/httpd/conf and a directory /etc/httpd/conf.d, and there seem to be two similar but not equal configuration files, namely /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/system-config-httpd.conf It appears that the latter, system-config-httpd.conf is used and modified by the gui accessible via system->administration->server-settings->httpd Using that gui, I made the directory /var/www/mediawiki accessible via http; I can access it using firefox, which I could before I even used the gui, but can not follow the links on the mediawiki startup window, which i also couldn't do before using the gui. The first question is, should I just forget about the GUI and do the setup by hand in the /etc/httpd/conf/httpd.conf file? - And is it the right file to modify? The second question is then, why are there two different files? And what do they have to do with each other? Is some of this stuff simply broken? The file system->administration->server-settings->httpd looks particularly messy, with many large chunks of blank lines. The third question would be, why is everything sooooo complicated? If I was setting up a real webserver (this is only for my LAN, and in fact for now just one or two PCs), I might have nightmares about not having located and secured the last config file. I suspect the biggest security threat to computers is the inflation of configuration files, containing ever more jargon and heaps of options, plus a big toolbox full of half working setup-wizards. --- OK, I stop whining now. |
I didnt read your post completely but here is what I think you want.
/etc/httpd/conf/httpd.conf thats the conf file, no other files matter. mediawiki is probably not running cause it should be in /var/www/html/mediawiki |
That's a good point. I checked it though: the problem doesn't seem to be that mediawiki has it's own branch off /var/www. The configuration files for the mediawiki seem all to assume that. Things are organized by inclusion of other conf files in conf files. In particular, /etc/httpd/conf/httpd.conf includes the configuration files in /etc/httpd/conf.d. In httpd.conf is a statement
Code:
# Load config files from the config directory "/etc/httpd/conf.d". auth_mysql.conf perl.conf proxy_ajp.conf welcome.conf manual.conf php.conf python.conf mediawiki.conf phpldapadmin.conf ssl.conf mod_security.conf phpMyAdmin.conf system-config-httpd.conf (You see where I'm coming from saying there are too many darn config files?:) ) In particular, the file mediawiki.conf starts as follows: Code:
Alias /mediawiki /var/www/mediawiki |
Solved (mostly)
w3bd3vil's hint was important - It's always good to know which tree to bark up first...
In the file /etc/httpd/conf/httpd.conf I added the following entry (hostnames are examples): Code:
# hack for mediawiki Code:
Alias /mediawiki /var/www/mediawiki BTW, I completely got rid of the file /etc/httpd/conf.d/system-config-httpd.conf which is one of the additional configuration files that are included into httpd.conf by the include statement Code:
Include conf.d/*.conf |
look at /etc/hosts to avoid barking up wrong trees
One important thing that kept me for a long time in the loop is the new IPv6 standard of writing the loopback address of a host.
I could not understand that, even after giving full access to all hosts on the LAN in the httpd.conf file, I still got messages in /var/log/httpd/error_log that told about the host named [::1], which wasn't allowed. When I then realized that everything worked fine if I browsed the wiki on this PC from a different PC on the LAN, but nothing when I worked on this PC, I somehow got the message. Then I found Mauriat Miranda's "personal installation instructions" at http://www.mjmwired.net/resources/mjm-fedora-fc6.html. With the IPv6 standard, the file /etc/hosts in FC6 initially contains the following statement: Code:
# Do not remove the following line, or various programs Code:
# hack the following lines as good as you can |
All times are GMT -5. The time now is 02:16 PM. |