Home › Forums › OS X Server and Client Discussion › Web › Apache, Performance Cache and trailing slashes
- This topic has 1 reply, 1 voice, and was last updated 21 years, 6 months ago by
Sean Howard.
-
AuthorPosts
-
April 22, 2005 at 8:56 pm #361408
Sean Howard
ParticipantI remember an old thread discussing this with people recommending editing the httpd.conf file by hand. We recently disabled the Performance cache and I decided I would share what we did. So I can learn better ways and to help others who are having the same challenge.
Challenge: With the performance cache that ships with OSX one must always specify the trailing slash on any directory or the user gets redirected to port 16080 and hangs
Potential solutions: Open up port 16080 in the firewall (not very professional in our opinion)
or…
Disable the performance cache.
Toggling the Performance Cache checkbox in the Server Admin options under a website does not solve the problem. Sites appear to still be routed through the cache, but it’s more like a proxy now.
What we did:
First, we were using virtual domains.So we made a copy of the sites folder in /etc/httpd/ This is where all of our virtual domain .conf files were stored
cd /etc/httpd/
cp -pR sites sites_22apr05_16080Then I went into the sites folder and edited each file, changing the entry at the top from :16080 to :80
cd sites
vi 0001_…
:%s/16080/80/g
:wqSo now Apache will direct those virtual domains to port 80. Now we just had to stop the performance cache from listening on port 80. We gave up on attempting to control it via SystemStarter and took the poor mans solution.
cd /usr/sbin/
mv webperfcache webperfcache_disabled
mv webperfcachectl webperfcachectl_disabledThen we rebooted the server and the slash is no longer required. And we no longer have a performance cache.
IMPORTANT: If you follow these steps, you can never use Server Admin again to edit your sites or they will be re-written for port 16080. And I can’t guarantee you won’t affect or break something else. We appear to be stable at this stage. Cyrus and apache appear to be running fine.
April 23, 2005 at 4:46 am #361415Sean Howard
ParticipantGAH!!!
lol.
Well, at least I now know. 😉
Thanks Joel.
-
AuthorPosts
- You must be logged in to reply to this topic.