Set up local webserver on MacBook Pro Sonoma 14.5

I am following etresoft's article, Setting up a local web server on macOS 14 “Sonoma” (Setting up a local web server on macOS 14… - Apple Community) to set up a local web server. Things were going well until

I got to the line where I needed to enter


sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist


I got the error

Load failed: 5: Input/output error


I get the index file when I go to localhost but when I go to localhost/<my username>, I get, Not Found. The requested URL was not found on this server.

MacBook Pro 16″, macOS 14.5

Posted on Jul 24, 2024 9:12 PM

Reply
4 replies
Sort By: 

Jul 31, 2024 11:41 AM in response to jeannefrombirmingham

> I get the index file when I go to localhost but when I go to localhost/<my username>


that URL would only work if there's a file in Apache's default directory named '<my username>'


If you're trying to enable per-user web sites (and have edited Apache's configuration to do so), then the appropriate URL would be http://localhost/~<my username>


(the ~ tells Apache to look in the appropriate user's directory for content, rather than the Apache default directory.


Without knowing your goal here (do you want ~username URLs? or a single unified site?), it's hard to tell you what needs changing.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Set up local webserver on MacBook Pro Sonoma 14.5

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