Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

may89

macrumors newbie
Original poster
Mar 4, 2014
8
0
Hey folks,
I have mac pro mid 2012 mavericks.
Apache server doesn't work on my mac. When I enter localhost on web browser it shows me
2dlirdl.jpg

I don't know how to solve this problem. Anyone can help me fixing it?:confused:
 
Well actually it was working. At first when I wrote localhost there was "It Works!". Now it doesn't work I don't know why.
 
Apple has made it way harder to set up a web dev stack in Mavericks than what it needs to be. The guides I've looked at are all pretty lacking in one way or another. If you're just trying to run apache for something quick/simple then press on. If you plan on doing anything remotely more intense such as scripting or long term dev, look into another easier to use stack like xampp. You'll save yourself some hours of frustration.

The issue you're seeing is a permissions related one. Theres a number of things that could be wrong here, but off the top of my head...

1.) The file you're trying to read doesn't have proper permissions. Go into terminal and make sure its chmod 644 for a static file or chmod 755 for a script.
2.) the directory or one of the parent directories your content is in doesn't have proper permissions. Say your apache conf is set to use /foo/bar/mywebsite/. All 3 of those directories 'foo', 'bar', and 'mywebsite' need to be chmod 755.
3.) you might need to play with chown'ing /foo/bar/mywebsite to _www or your username.
 
Have to agree Xampp or Mamp for development work on a Mac. Save yourself the headache. It is a quick & easy install of either and you will be running in no time.
 
I think you need to set Apache Directory Options to show Indexes, then you'll be able to view your root directory. You do this by adding a .htaccess file to the root and adding the following text to it:

Options +Indexes
 
Last edited:
I think you need to set Apache Directory Options to show Indexes, then you'll be able to view your root directory. You do this by adding a .htaccess file to the root and adding the following text to it:

Options +Indexes

Another option is to just make sure there is an index.html file in your web root. The error you're seeing is because there is not an index page, and indexes are disallowed.

Add an index file with some content and it should show up.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.