Here's a bit more detail that has turned up:

Things are only working at this point from the VirtualHost I set up
for the Cake Blog tutorial. My directory /Users/username/Sites/
cakeblog can be accessed simply as "http://cakeblog";. The VirtualHost
is set up like this:

In httpd.conf add this -

NameVirtualHost 127.0.0.1

<VirtualHost cakeblog>
        ServerName cakeblog
        DocumentRoot /Users/username/Sites/cakeblog
</VirtualHost>

Then in /etc/hosts add this -

127.0.0.1 cakeblog

Of course if your localhost ip address is different.... I used this
article as a basis for setting this up: 
http://articles.sitepoint.com/article/os-x-web-development

There are clues as to why the site is not working when addressed
directly "http://localhost/~username/cakeblog";. The 404 error says:

Not Found
The requested URL /Users/username/Sites/cakeblog/app/webroot/ was not
found on this server.

This seems completely strange since that is PRECISELY the correct
path. But looking at the apache error logs reveals a surprise:

[Tue Mar 16 17:11:09 2010] [error] [client ::1] File does not exist: /
Library/WebServer/Documents/Users

Well, /Library/WebServer/Documents is the path to the plain localhost
site. There is no Users directory there. Users is the start of the
path to localhost/~username site. Something about turning mod_rewrite
on for the directory, or about the a the specific rewrites in
the .htaccess files, or some other unknown factor is trashing the way
apache is mapping localhost url's into my directory structure.

Possibly someone who is actually FAMILIAR with these issues has a
solution.

The problem seems to be related to the actual rewrites and
the .htaccess files. I say this because typing in a bogus user site
url like "http://localhost/~username/junk"; provide the properly mapped
404 error "The requested URL /~dondrake/junk was not found on this
server."

Further GOOD news though:

Placing the cakeblog directory in /Library/WebServer/Documents/ and
turning on the AllowOverride for that directory in httpd.conf ALSO
works.

So, all these hours were lost because I picked 'heads' instead of
'tails' on the where-to-install coin toss.

Happy Baking (I guess)
Don Drake

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to