Posts Tagged ‘apache’
Apache: Directories and trailing slashes
Apache does something interesting (yes, I still think it’s logical) when you’re accessing a directory that it’s serving: if you access it without a trailing slash, it’ll add one by default. This makes sense if you’re going after some static content or a folder index (or pretty much any sane usage) but it didn’t fit my use case of serving Plone using rewrite rules in a .htaccess file. (more…)
Missing content menus in Plone
Another dose of insanity please! Coming right up, sir.
Today’s second discussion comes from an issue I was having recently with a new Plone site that I was hosting behind Apache and Deliverance. No Varnish here yet, because I’d rather the site worked first before I try and cache the life out of it.
Now, the specific problem I was having was that the content menus in Plone (eg Add New, Display, State, Actions and for me, Sub-types) weren’t displaying. I thought it a Deliverance issue – maybe I was dropping those content items accidentally or not including the JavaScript needed to display them. Uh, nope on both accounts.
Solution
After a detailed search of everything I could have been doing wrong, I can across my Apache rewrite rules. Amazingly enough, I’d left off the /_vh_mysite at the end, so the URLs weren’t being written correctly. Whilst the site was loading (mostly) fine, because I’d inserted the URL to point to the site correctly, I’d forgotten that the VHM needs the _vh_mysite part.
Adding it in fixed the problem in a second, along with a throat-clearing shift-refresh.
Rewrite Rules Made Easy
I’ve pretty much got a nice handle on Rewrite rules for Apache. Once you’ve seen a few of them, it’s straight forward enough to replicate for new Plone sites and so forth.
However, to make things even easier on my brain I’ve found this: http://betabug.ch/zope/witch , the Rewrite Rule Witch. Seems like the rules it produces are what I’d expect, which makes me ponder why, if I know they’re right, would I bother.
Reason: easy confirmation and less chance of typos.