Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

localhost access not working under Leopard

When I attempt to set my browser to a URL like:

http://localhost/~AllenW/UnityByAW/index.html

I get a message telling me, "Forbidden: you do not have access to blah-blah on this server."

Yet, if I boot back into Tiger and try the exact same thing, it works fine. Same user (AllenW) in both cases. I have no other trouble with file permissions.

Any suggestions, anyone?

Macbook (1st gen) 2GB RAM, Mac OS X (10.5)

Posted on Nov 4, 2007 4:49 PM

Reply
21 replies

Mar 23, 2008 3:36 PM in response to j4m3s

So frustrated - ever since I installed the latest security update for Leopard, my web server has stopped running. I'm using the Apache2 installation that came with Leopard, but have compiled PHP4 to run with it. Since the 'security update', I now get the error "libphp4.so no suitable image" and "wrong architecture".
I've tried re-compiling PHP4, but that doesn't do any good... Anyone have any ideas?

Thank in advance

Mar 27, 2008 4:03 PM in response to Allen Watson1

Did you do an upgrade to install Leopard? That's what I did and had this problem. I found a note at the end of "Enabling PHP and Apache in Leopard" by David Powers that addresses this w/a simple fix. It worked beautifully for me.

http://foundationphp.com/tutorials/php_leopard.php
At the bottom:
"NOTE: If you did an upgrade install of Leopard, you cannot view pages stored in your personal Sites folder, because the necessary file(s) won't have been copied..."

Apr 13, 2008 5:04 AM in response to jewhanso

I still get this error when trying to connect to my personal web sharing page: http://localhost/~davidhong, http://127.0.0.1/~davidhong, and http://192.168.0.5/~davidhong.

Error message:
"Safari can’t connect to the server.
Safari can’t open the page “ http://192.168.0.5/~davidhong/” because it could not connect to the server “192.168.0.5”."


I have:

Apache 2 configuration:
-rw-r--r-- 1 root wheel 141B 28 Nov 05:47 Guest.conf
-rw-r--r-- 1 root wheel 145B 28 Oct 15:51 davidhong.conf
davidhong@davidhong: /private/etc/apache2/users
10:03:30>head davidhong.conf
<Directory "/Users/davidhong/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>


This used to work perfectly fine on Tiger...

Any suggestions? Could this problem with users? I have enabled the Guest account.

Message was edited by: David G. Hong

May 15, 2008 12:30 AM in response to gkuhns

nice, thanks from me too glitchy. For the record this issue with a missing log folder for apache2 seems to be an issue after a restore from timemachine because timemachine doesn't write back anything that can be rebuilt, but here this seems to be data that can be rebuilt but apache won't start up without the folder that would enclose that rebuilt data.

Anyway back to work...

Jun 27, 2008 12:11 AM in response to liberalart

Perfect perfect perfect.

I restored from Time Machine and immediately found the same problem:

Safari can’t open the page “ http://localhost/” because it can’t find the server “localhost”.

Turned web sharing off, entered this into Terminal:

*sudo mkdirhier /private/var/log/apache2/*

Restarted web sharing and now I'm back in business.

THANKS!

localhost access not working under Leopard

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.