I have a password protected Apache server running on my iMac (OS X Sierra 10.12.1) at home for personal purposes. It is accessible by the internet so that I can access my home files when I am outside my home.

I have configured settings on my iMac so that I can lock the screen without making it go into sleep mode. However the web server still doesn't always run. When I try to access it from outside home, it only works about half of the time. I know that my home network being down etc. is not the issue, because connecting to my VPN server running on my Mac mini on the same network always works.

I understand that making an iMac web server always accessible might be problematic, but if anyone know how to solve this or improve the uptime just a little bit I would be very grateful.

  • Maybe turn on Wake for Network Access in settings under Energy Saver. Not sure what else it could be, other than putting the hard disks to sleep when possible. – bret7600 Dec 4 '16 at 22:53
  • Please check your system logs for apache errors – klanomath Dec 4 '16 at 22:53
  • @bret7600 Thanks for the suggestion, I didn't know about this option. Sounds like it might help. – tjespe Dec 4 '16 at 22:54
  • @klanomath I don't believe there are any errors. The server always works when my mac screen is on. It would be hard to find those errors anyway because the screen usually has to be locked for a while before the problem takes place, and it doesn't always happen at all. It's a very inconsistent problem. – tjespe Dec 4 '16 at 22:57
  • @bret7600 Apparently, this setting was already enabled. However, when I looked at the other power saving options, I found that I could uncheck "Put hard disks to sleep when possible". Maybe this will solve it. – tjespe Dec 4 '16 at 23:02

so that I can access my home files when I am outside my home

If this is all you really want to do then you are using the wrong tool.

Go to System Preferences -> Sharing and enable File Sharing. Then go to Options (same panel) and check the AFP box. Then forward port 548 on your router.

You can now access your files from the Finder ( Go -> connect to server) with read-write access instead of download only.

| improve this answer | |
  • AFP isn't supported by windows, and therefore doesn't make it a viable option to transfer files to a non-mac. It's likely why he's using apache. – bret7600 Dec 5 '16 at 11:44
  • Furthermore, the SMB protocol file server runs on port 445, and may be yet another (more complicated) option. – bret7600 Dec 5 '16 at 11:45
  • Although it's mostly about accessing files, it is not just about that, I have a pretty advanced web server running and I want to be able to access it from my phone and from windows computers. Anyway, I don't know if the AFP sharing would work any better than the web server. – tjespe Dec 5 '16 at 16:23

You must log in to answer this question.

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