09/05/2015 - MAC
Apache serveri konfigüre edip, Mac OS işletim sisteminde sanal hosts kullanmak isterseniz, aşağıdaki adımları takip edebilirsiniz.
# /etc/apache2/httpd.conf
# Aktifleştir
LoadModule dir_module libexec/apache2/mod_dir.so
LoadModule alias_module libexec/apache2/mod_alias.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
# <Directory "/Library/WebServer/Documents"> blok ayarları aşağıdaki gibi olacak:
Options FollowSymLinks Multiviews Indexes
AllowOverride All
# Aktifleştir
Include /private/etc/apache2/extra/httpd-autoindex.conf
Include /private/etc/apache2/extra/httpd-languages.conf
Include /private/etc/apache2/extra/httpd-vhosts.conf
Bu işlem yapılmazsa http://localhost/
linki izin hatası verir.
# /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents/"
</VirtualHost>