
- Mac randomly uses different email server for exchange how to#
- Mac randomly uses different email server for exchange mac os x#
- Mac randomly uses different email server for exchange update#
In php.ini: open_basedir = /Users/joao/Sites/:/var/tmp/ $ sudo launchctl load /System/Library/LaunchDaemons/.plist
$ launchctl load /System/Library/LaunchAgents/.plist $ sudo launchctl unload /System/Library/LaunchDaemons/.plist Reload the firewall: $ launchctl unload /System/Library/LaunchAgents/.plist
In the list click httpd and select Block incoming connections. Hit cmd ⌘ + ⇧ shift + G and enter /usr/sbin/httpd and click Add (If httpd doesn't show up there, you can look for it in the terminal by which httpd). Click the lock icon to the lower left and enter your password if needed. Open System Preferences » Security & Privacy » Firewall. Again, in nf: Listen 80Īnd restart Apache again: $ sudo apachectl restartĭisable Apache in the application firewall (note that you may have already disabled it if you clicked Deny if/when it was asked during the first time you run Apache): In fact, you should prevent this regardless of the scripts you run or even if you don't set Apache user to yourself since you probably don't want random outsiders to be able to see the contents of your localhost. But since this is just a local development environment, that shouldn't be a problem unless you have no rules to block Apache in your firewall and let questionable files like file explorers, shells, scripts that may contain vulnerabilities run under Apache in which case anyone including your public wifi neighbor in a cafe can enter and do whatever those scripts let them to do. Own them: $ sudo chown joao: /var/tmp/sess_*Īfter this, Apache (and PHP et al.) will run as you and will gain read/write permission to all of the files you have read/write permission. If you have active sessions, they are going to give permission errors since they are still owned by _www. In /private/etc/apache2/nf, set User to your username from _User _wwwĪnd then restart Apache: $ sudo apachectl restart I generally fix this by setting the Apache user to myself in local environments and in machines where the only user who uses Apache is me. (13)Permission denied: access to / denied (13)Permission denied: access to /favicon.ico denied Mac randomly uses different email server for exchange update#
Quick update - here's what my /var/log/apache2/joao.pt-error_log looks like: (13)Permission denied: access to / denied
/Users/joao/Dropbox/Workflow/Sites (the original directory). Because ~/Sites is actually a symlink, I then tried to update DocumentRoot with the following paths (all pointing to the same directory): It looks like Apache is somehow denying me access to my DocumentRoot (which by the way is ~/Sites). /etc/apache2/extra/nf ( view file - updated VirtualHost). /etc/apache2/users/nf ( view file - created this file). /etc/apache2/nf ( view file - updated the DocumentRoot). /etc/hosts ( view file - added one line). First I saw through the terminal that both Apache and PHP are running (even though I can't view PHP pages) then I updated all permissions according to Apache permissions now I'm just desperate. This time I'm simply getting a 403 Forbidden error every time I hit 127.0.0.1, localhost, or local. Mac randomly uses different email server for exchange mac os x#
Enabling Apache in Mac OS X Mountaion Lion.
Mac randomly uses different email server for exchange how to#
How to turn Mac OS X Lion into a web server?. I usually update /etc/hosts just to run my local websites with a pretty : local/example. I'm trying to set a local environment on my new MacBook Air 13": built-in Apache with my own DocumentRoot, PHP, and MySQL.