Я настроил Apache для виртуального хостинга на основе имен, но мне не удается отобразить локальный сайт в браузере. Мой httpd.conf неправильно настроен? Вот продезинфицированная версия:
#
# Use Name-based Virual Hosting.
#
NameVirtualHost *.:80
#
#Set up permissions for VirtualHosts in ~/Sites
#
<Directory "/Users/myusername/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# For http://localhost in the OSX default location
<VirtualHost _default_:80>
ServerName localhost
DocumentRoot /Library/WebServer/Documents
</VirtualHost>
<VirtualHost *:80>
ServerName thewebsite.local
CustomLog "/Users/myusername/Sites/logs/thewebsite.local-access_log" combined
ErrorLog "/Users/myusername/Sites/logs/thewebsite.local-error_log"
DocumentRoot "/Users/myusername/Sites/thewebsite.local"
</VirtualHost>
И мой etc / hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 thewebsite.local
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost