I have a fresh Lion install, and to configure Apache, I've edited all of the references to DocumentRoot (and the Directory entry for DocumentRoot) to "/Users/jonathan/mirror" (with or without quotes as the original path was with or without quotes). Pointing my browser to localhost gives a 404:

Not Found

The requested URL / was not found on this server.

Apache/2.2.20 (Unix) DAV/2 Server at localhost Port 80

How can I up /Users/jonathan/mirror with appropriate permissions?

  • Any reason you don't want to use MAMP? It's free and self contained (you don't have to mess with Apple's files) – Loïc Wolff Feb 1 '12 at 14:53
  • Never mind; I copied the httpd.conf from the old server. – Christos Hayward Feb 1 '12 at 14:56
  • In the days of yore I was a system administrator and I usually prefer to work with things unbundled as far as Unix goes. I've had a rough experience with XAMPP sometime back. – Christos Hayward Feb 1 '12 at 14:57
  • Did you enable virtual hosts? – Gerry Feb 1 '12 at 21:42

Things do doublecheck:

1. File permissions

The specified path for the new document root should allow at least read access for the Apache user, which is _www by default. You probably want to chmod 755 /Users/jonathan/mirror if the file permissions are too restrictive. What are the actual file permissions on the directory and files?

2. Virtual hosts

When you enable name based virtual hosts, the document root in the main config is ignored. Instead the root for the matching hostname will be used, and if none match it will default to the first virtual host.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .