0

I am trying to connect my iPhone to a web service on my Macs local machine.

On the Mac I can go to localhost/~username and i get "My Site Works"

On the iPhone I go to xxx.xxx.xxx.xxx (Macs IP Address) and I get "It Works!" but when I go to xxx.xxx.xxx.xxx/~username I get Forbidden - You do not have permission to access /~username on the server

Both devices are on the same Wi-Fi network

This is Mac OS X, Please don't link to solutions for Windows. I'm a Total Noob

  • Possible duplicate of [WAMP Cannot access on local network 403 Forbidden](http://stackoverflow.com/questions/23382627/wamp-cannot-access-on-local-network-403-forbidden) – codez Nov 14 '15 at 12:55
  • That solution is for Windows. I'm on OS X – JWalker1995 Nov 14 '15 at 13:20
  • You have to alter the `httpd.conf`file... it has nothing to do with the OS.. It's a file in apache. – codez Nov 14 '15 at 13:23
  • I have looked through the tutorial and I don't have a `# onlineoffline tag` is the below the same? `# Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # blocks below. # AllowOverride none Require all denied ` – JWalker1995 Nov 14 '15 at 13:38
  • Yeah, that is the problem. Make it: AllowOverride all Require all inside the Directory tag. – codez Nov 14 '15 at 13:42
  • have completed the below, still getting forbidden – JWalker1995 Nov 14 '15 at 13:47
  • Used sudo apachectl -k restart and got AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Jamess-Mac-Mini.local. Set the 'ServerName' directive globally to suppress this message Still getting forbidden – JWalker1995 Nov 14 '15 at 14:05
  • ServerName must be localhost or a domain name.. – codez Nov 14 '15 at 14:10
  • that cleared the warning up but still getting forbidden on the device :( – JWalker1995 Nov 14 '15 at 14:12
  • Fixed it. Had a custom username.conf where I had require set to local, not all – JWalker1995 Nov 14 '15 at 14:20

1 Answers1

0

Open Settings on your Mac, go to Sharing, enable file sharing, add your users folder to shared folders and allow everybody to access the resource.

dogsgod
  • 6,267
  • 6
  • 25
  • 53