简体   繁体   中英

OSX Mountain Lion localhost problems

Today I have followed some tutorials about making everything working on Mountain Lion.

I have installed Web Sharing and it is enabled, I have also enabled php (the one that comes with mac, I dont know to update it).

So I stoped there without installing MySQL and phpMyAdmin because localhost doesnt work properly for me.

If I type

http://localhost/ - I get It works!

If I type

http://localhost/~dvLden/ - I get My site works

However if I open an project like so:

http://localhost/~dvLden/test

I get some strange things...

Sometimes I get the error (depending of project) Forbidden You don't have permission to access /~dvLden/test on this server.

And sometimes site works but many things are broken (incorrect path) even tho, paths are perfecly correct.

Any clues about why is this happenning ? If you need anymore info, let me know!

EDIT #1: Some updates...

[Thu Sep 20 16:34:58 2012] [crit] [client ::1] (13)Permission denied: /Users/dvLden/Sites/test/slider/images/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://localhost/~dvLden/test/index.html

[Thu Sep 20 16:46:45 2012] [crit] [client ::1] (13)Permission denied: /Users/dvLden/Sites/test2/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Fixed.

The problem was that most previous projects that I wasnt able to access were made on Windows. All folders transfered didn't got Sites chmod 644 and I dont know why.

So I just made new folders for every site that I was unable to open and for every path that was "invalid".

Now works perfectly.

PS There was probably an way to chmod all subfolders of "Sites" but I am new to mac so I don't know that. Cheers and good luck.

chmod -R o=rwX,go=rX ~/Sites

was exactly what did the trick for me - but I needed to change my home directory as well. After a

chmod -R o=rwX,go=rX /Users/

everything worked like a charm ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM