Anyone want to document this weird solution? :-)
--
#ken P-)}
Ken Coar <http://Golux.Com/coar/>
Apache Software Foundation <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed" <http://ApacheUnleashed.Com/>
--- Begin Message ---
Here's a trick I finally got working. A way to make Apache case
insensitive on linux/unix servers. Feel free to pass this on. It seems
to be working well.
The problems started when migrating from NT to Linux. As you know NT is
case insensitive, so anything matched. I moved to Linux and had a lot of
problems with "file not found". Even after changing everything to lower
case, there were still external web sites that linked to me that were in
the wrong case. I had at first came up with some rules to convert all
requests to lower case to fix that, but now I have a better solution.
The trick is to use SAMBA.
Samba is a service that emulates a windows NT server. It normally is
used to let windows machines to access Linux files pretending to be a
windows server. One of the features of Samba is that the file system is
not case sensitive. You can save in and case and it preserves it. But a
file requests in any case matches.
Now, before I tell you my solution, I want to piss some people off.
Windows case insensitivity is superior to the Unix case sensitivity BUG.
Unix is stuck with it, but to have to files with the same name is
stipid.
Back to the solution. I have a directory named /www where my web sites
are stored. I have another directory named /web which is merely a mount
point. The idea is to mount /www as /web using Samba services. Thus
files under /web are the same as /www but you no longer have to match
case to load the web page.
I created a samba share named web. The "web" share exports the
directory /www. I made a dummy user "webuser" to have rights to the
share. I also made the share read-only and restricted access to 127.
block of IP addresses. Thus it can only be loaded from the localhost.
Then I mount the share.
mount -t smbfs -o username=webserv,password=123456 //localhost/web /web
Thus /www and /web are the same except /web is processed through Samba
and all your case problems go away. If you want to preserve the old case
rules, you can still access /www. You have the best of both worlds.
Does it slow you down? Use more processor or resources? Sure, in
theory. But hell, I'm running on a pentuim iii box in the first place
and have excess power to start with.
Anyhow, I beat the system. Pass it on.
--- End Message ---