Основываясь на других ответах, я смог заставить Apache загружать страницы localhost:
2.2 конфигурация:
Order allow,deny
Allow from all
Конфигурация 2.4:
Require all granted
Это прекрасно работает для локальных страниц, таких как mylocalsite.local (возвращает полную страницу, включая необходимые ресурсы во вложенных каталогах, таких как css и images).
Но когда я пытаюсь посетить подкаталоги, такие как mylocalsite.local/subdir он возвращает Not Found - The requested URL /subdir was not found on this server.
Смотрите ниже, как мои виртуальные хосты настроены. Очевидно, что mylocalsite.local установлен в 127.0.0.1 в /etc/hosts чтобы получить это далеко.
<VirtualHost *:80>
    ServerName mylocalsite.local
    ServerAlias www.mylocalsite.local mylocalsite_alt.local
    <Directory /Users/my_username/Sites/mylocalsite/html>
        AllowOverride none
        Options all
        Require all granted
        Deny from none
        <IfModule mod_rewrite.c>
            Options +FollowSymLinks -MultiViews
            RewriteEngine On
            RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
            RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
            # Redirect all /img/abc to /img/index.php/abc
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^img/(.*) img/index.php/$1 [L]
            # redirect all directories to root using PATH variables
            # Ex. /abc/def/ redirects to /index.php/abc/def/
            RewriteCond %{REQUEST_URI} !=/server-status
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule (.*) index.php/$1 [L]
        </IfModule>
    </Directory>
    DocumentRoot /Users/my_username/Sites/mylocalsite/html
</VirtualHost>
Вы видите, почему это не решается правильно?
Другие отладки:
> sudo apachectl configtest
Syntax OK
> httpd -S
VirtualHost configuration:
*:80                   is a NameVirtualHost
     default server sandbox (/private/etc/apache2/vhosts/virtual_hosts.conf:8)
     port 80 namevhost sandbox (/private/etc/apache2/vhosts/virtual_hosts.conf:8)
             alias sandbox
     port 80 namevhost mylocalsite.local (/private/etc/apache2/vhosts/virtual_hosts.conf:20)
             alias www.mylocalsite.local
             alias mylocalsite_alt.local
ServerRoot: "/usr"
Main DocumentRoot: "/Users/my_username/Sites"
Main ErrorLog: "/private/var/log/apache2/error_log"
Mutex default: dir="/private/var/run/" mechanism=default 
Mutex mpm-accept: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex proxy: using_defaults
PidFile: "/private/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="_www" id=70 not_used
Group: name="_www" id=70 not_used
В Mac OS X Mavericks 10.9 все работало безупречно.
