403 on localhost

Joined
Oct 26, 2007
Messages
9
Reaction score
0
Points
1
Your Mac's Specs
MacBook Pro 10.5
Whenever I try to reach http://<computer-name>.local/~<user>/ or http://localhost/~<user> I get a 403 forbidden message.

I have turned web sharing on.
My Sites folder has chmod to 777

Help ?
 
OP
D
Joined
Oct 26, 2007
Messages
9
Reaction score
0
Points
1
Your Mac's Specs
MacBook Pro 10.5
Yes, the one that comes with 10.5 (I think its 2.2)
 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
Reason I asked is I found this and it mentions something about enabling PHP ... the article is dated and I'm not sure if it'll help but I gotta try ..
 
OP
D
Joined
Oct 26, 2007
Messages
9
Reaction score
0
Points
1
Your Mac's Specs
MacBook Pro 10.5
no that didn't solve it.

I tried to restart Apache (with apachectl -k restart), but I get this:

httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
no that didn't solve it.

I tried to restart Apache (with apachectl -k restart), but I get this:

httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

In Terminal:

sudo apachectl start​
 
OP
D
Joined
Oct 26, 2007
Messages
9
Reaction score
0
Points
1
Your Mac's Specs
MacBook Pro 10.5
I get this:
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:
org.apache.httpd: Already loaded
 
Joined
Oct 27, 2005
Messages
4,702
Reaction score
404
Points
83
Ok, just what I was thinking would happen ... it's telling you that your server is already running ... but where is httpd?

BTW make sure Web Sharing is off in Sys Prefs ..... that can muck things up

Some more things to try:

Check the Advanced Options in your Firewall Settings:

Sys Prefs ~> Sharing ~> Firewall ~> Advanced,

and make sure that the Stealth Mode is turned off.

Try a search from a Terminal window to try and find your httpd.conf file, so try this command:

cd /etc/httpd

and then

ls -la

Then let me know what transpired ...
 
OP
D
Joined
Oct 26, 2007
Messages
9
Reaction score
0
Points
1
Your Mac's Specs
MacBook Pro 10.5
this is what showed up after ls -la

total 448
drwxr-xr-x 11 root wheel 374 Oct 17 17:51 .
drwxr-xr-x 101 root wheel 3434 Oct 27 12:31 ..
-rw-r--r-- 1 root wheel 38334 Oct 17 17:51 httpd.conf
-rw-r--r-- 1 root wheel 37417 Jan 13 2006 httpd.conf.bak
-rw-r--r-- 1 root wheel 38334 Jan 13 2006 httpd.conf.default
-rw-r--r-- 1 root wheel 38334 Jan 13 2006 httpd.conf.entropy.backup
-rw-r--r-- 1 root wheel 12965 Jan 13 2006 magic
-rw-r--r-- 1 root wheel 12965 Jan 13 2006 magic.default
-rw-r--r-- 1 root wheel 15201 Jan 13 2006 mime.types
-rw-r--r-- 1 root wheel 15201 Jan 13 2006 mime.types.default
drwxr-xr-x 4 root wheel 136 Oct 17 17:51 users
 
OP
D
Joined
Oct 26, 2007
Messages
9
Reaction score
0
Points
1
Your Mac's Specs
MacBook Pro 10.5
I tried with Websharing on and off, same result, and Stealth Mode is off.
 
OP
D
Joined
Oct 26, 2007
Messages
9
Reaction score
0
Points
1
Your Mac's Specs
MacBook Pro 10.5
I sorted it out.

When I browsed to /private/etc there was a httpd folder and an apache 2 folder. the apache 2 folder didn't have any users set, so I copied the user.conf from httdp and now it works.

only problem now is that php Isn't installed. I tried the entropy installer for apache 2 but no luck.
 
Joined
Nov 13, 2007
Messages
18
Reaction score
0
Points
1
Your Mac's Specs
G4 (Graphite)1.4GHz, Macbook Pro 15" 2.2Ghz.
I'm having the same problem as above:

localhost, or 127.0.0.1 or http://<my mac>/~<my name> give 403 forbidden errors
If i just try , http://<my mac>/ then i get the apache default page.

web sharing off gives "server not found"

I've tried changing permissions on terminal to no avail [chmod 755 Sites and chmod 777 sites]

I don't know enough to try this last post above, ie where is private/etc
I've searched for an httpd file and all i found was a u nix exec file, and a couple of others with suffixes.

also, checking console i see this as the second last line:
26/03/2008 14:33:34 com.apple.launchd[1] (org.apache.httpd) Unknown key: SHAuthorizationRight

does this mean i'm just not authorized to access my own localhost?
drollecke are you still around, or has anyone else come across this?

(I'm on 10.5, upgrade from 10.4)

I just want to use the "Sites" localhost!:Grimmace:<cries>
Any help please?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top