May 26th, 2004 • 6:31 am
This is a follow-up to my report on setting up a blogging system on my Xserve running Panther Server (Mac OS X Server 10.3.3).
Yesterday I wrote that I had managed to get most things to run fine on the Xserve, including PHP, MySQL, and the open source WordPress blogging system. The only thing that I couldn’t get to work properly was the feature in WordPress that enables the use of user-friendly URLs for links to specific items within the blog.
It turns out that, as is often the case, my problem was basically a lack of understanding of the underlying mechanisms that govern things in Panther Server and in the Apache-based web service in particular. It was also due to the fact that the recommendations in the WordPress documentation are mostly intended for people who install WordPress on someone else’s server and don’t have admin access to the server’s configuration. In that case, the only way to implement the user-friendly URLs is to upload a customized
.htaccess file to your root folder on the server. But for this to work, this
.htaccess file needs to be able to override the server-wide settings established by the server administrator.
It just so happens that the ability to use
.htaccess files that override the server-wide settings is off by default in Panther Server’s Apache configuration. I tried to change that in the main
httpd.conf file that contains all the Apache configuration settings, but that didn’t work. I then discovered that there was not only a general
httpd.conf file for the server, but also a
.conf file for each web site hosted by Panther Server. (Each user in Panther Server can have his own web site.) And it seems that the default web site has its own
.conf file too. So even if you are the only user with a web site, you still have to manage two files, both of which have a setting that allows
.htaccess files to override their other settings.
If you are getting a bit confused, well, so was I. At that stage, I figured that it would probably be faster for me not to try to use the
.htaccess file to override the settings, and to simply include the rewrite rules that WordPress needed for the user-friendly URLs in the
.conf file instead. I did just that… and it still wasn’t working. Since the 404 error page was loading so fast on my pokey modem connection, I started suspecting cache issues. And once I did a force-reload of the web site in Safari (holding the Option key down while clicking on the Reload button), finally, it started to work.
I would say that the lesson here is that 1) the documentation for open source products is not always user-friendly, especially when the “user” in question happens to be a Mac-using server administrator; 2) in spite of Apple’s efforts on the graphic UI front in Panther Server, there are still many things that simply cannot be done through the UI and that require that you go and get your hands dirty by editing configuration files manually.
None of this is surprising. But when you experience it first-hand, it still is a challenge, no matter how prepared you are. I don’t think anyone really has time to read through the entire documentation for tools such as MySQL or Apache. (We are talking about hundreds, if not thousands of pages here.) You just read what you need — but it’s a bit of a catch-22 because you need to start reading in order to determine what you need to read.
Oh well. Live and learn, as they say.