
Now, edit Apache’s virtual hosts configuration file nf, and place the following:ĭocumentRoot "/Library/WebServer/Documents"ĬustomLog "|/usr/sbin/rotatelogs /private/var/log/apache2/default-access_log 86400" combinedĮrrorLog "|/usr/sbin/rotatelogs /private/var/log/apache2/default-error_log 86400"ĭocumentRoot "/Users/damiano/Sites/test.site"ĬustomLog "|/usr/sbin/rotatelogs /private/var/log/apache2/test.site-access_log 86400" combinedĮrrorLog "|/usr/sbin/rotatelogs /private/var/log/apache2/test.site-error_log 86400"

Next step, edit /etc/apache2/nf, and uncomment: The Sites folder is no longer present in OS X 10.8, but you can create it manually from the Terminal: mkdir ~/Sitesįor instance, for the project that I will be hosting locally at, I created a folder called test.site: mkdir ~/Sites/test.siteįirst, let’s add the test.site domain to hosts file: sudo nano /etc/hostsĪt the end of the file, add: 127.0.0.1 test.site I've looked in access_log, error_log, and php_error_log and can't find anything resembling my request to mytest.I like to place each of my projects in a subfolder of Sites. I'm not getting anything even closely related to my problem in the error logs. There is no hosts file inside my /Xampp/etc directory.įinally, because my DocumentRoot in the directive is this: "/Applications/XAMPP/xamppfiles/htdocs/myTest" I have an index.php file that has a hello world script in it, inside the myTest directory.

However, the above line is in the root /etc NOT in the /Applications/XAMPP/etc. My /etc/hosts file has this in it: 127.0.0.1 v

My /Applications/XAMPP/etc/extra/nf my virtual host looks like this: ĭocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/myTest" # Controls who can get stuff from this server. # It can be "All", "None", or any combination of the keywords: # AllowOverride controls what directives may be placed in. Options Indexes FollowSymLinks ExecCGI Includes # The Options directive is both complicated and important. # Note that "MultiViews" must be named *explicitly* - "Options All" # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # Possible values for the Options directive are "None", "All",

In my /Applications/XAMPP/etc/nf file I have the following line UN-commented and my directive thing looks like this: Include etc/extra/nfĭocumentRoot "/Applications/XAMPP/xamppfiles/htdocs" If you think this is a server error, please contact the webmaster.Īpache/2.4.18 (Unix) OpenSSL/1.0.2g PHP/5.6.19 mod_perl/2.0.8-dev Perl/v5.16.3 There is either no index document or the directory is read-protected. You don't have permission to access the requested directory. I go to "v" in the browser, and I get the following error: Access forbidden!
