Máy chủ ảo Apache trên Mac OS X Lion
Trong /etc/apache2/extra/httpd-vhosts.conf, tôi có: NameVirtualHost *:80 <VirtualHost *.80> ServerName localhost DocumentRoot "/Library/WebServer/Documents" </VirtualHost> <VirtualHost *:80> ServerName site1.local DocumentRoot "/Users/bob/Sites/site1.local" <Directory /Users/bob/Sites/site1.local> Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *.80> ServerName site2.local DocumentRoot "/Users/bob/Sites/site2.local" <Directory /Users/bob/Sites/site2.local> Order allow,deny Allow from all </Directory> </VirtualHost> Trong / etc / hosts, tôi có: …