Linux Blog

Apache “Directory index forbidden by Options directive:”

Filed under: Quick Linux Tutorials — TheLinuxBlog.com at 9:29 pm on Friday, June 27, 2008

This is a common problem with the Apache web server. It is considered a security risk to show the directory contents by default. Especially those in the root directory. The way to fix this is pretty simple, you first need to make sure that there are no -Index directives in any of the configuration files. In your httpd configuration directory grep with a line number for Options like so:

grep -n Options *

If you don’t see any -Indexes then its possible there are included files. Check these directories if you know them, if you don’t grep your configuration file for the Includes:

grep -n Include *

If you’re still getting the test page or a permission denied error after removing the directive that disables Indexes then it may be a permissions issue. Apache needs +x access for all users to enable directory listings. Change the permissions and it should work.

On Fedora there is a file called welcome.conf in the conf.d directory. This can be removed and if you have Options All set, then you should be good to go. On other distributions like Slackware it is easier to accomplish. I wouldn’t recommend allowing any sort of directory listing in a production environment but in my development case, where I only allow access to my test server on a per host basis this is not a big problem.

Also, remember to restart the server after making changes.

Hope this helps, if it doesn’t be sure to drop a comment!

Zend Studio Unexpectedly Quit Fix

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 6:43 am on Monday, January 21, 2008

Zend Studio is a really good PHP IDE for Linux well worth the money. Although it has a high price tag this doesn’t mean that its bug free. I some times have little quirks with it but they seem to have been fixed since I added more ram. Anyway recently while I was trying to use Zend it just would not open. I had to use another PHP IDE on my Linux box until I could figure out the problem. Well, the problem was:

This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)

Reinstalling Zend does not fix the issue. The issue seems to be in the configuration directory. All you have to do to fix this issue is:

rm -r ZDE

I’d make a back up first if I were you, just incase, but mine was broken and I didn’t really have anything in the config directory except some saved urls so I just deleted it. Now my Zend Studio works like it used to again! Hurray!, Now I hope it wont do this again for another 6 months or so.