????Mac ???ab??????????
????1.??Mac??????Apache
?????????Apache???????
sudo apachectl -v
???????????Apache??汾

????sudo apachectl start
????????Apache????????Safari?????????????? “http://localhost”??????????????“It works!”?????

??????????????????
??????Apache?????????
??sudo vi /etc/apache2/httpd.conf
??????httpd.conf?????“#Include /private/etc/apache2/extra/httpd-vhosts.conf”?????????“??”?????沢????????????е?#??????/extra/httpd-vhosts.conf?????????????????????á?
????#Include /private/etc/apache2/extra/httpd-vhosts.conf
???????????Apache
??sudo apachectl restart
????????????????
sudo vi /etc/apache2/extra/httpd-vhosts.conf
???????????????????????httpd-vhost.conf????????????????????????????????????????????????????????????
????<VirtualHost *:80>
????    ServerAdmin webmaster@dummy-host.example.com
????    DocumentRoot "/usr/docs/dummy-host.example.com"
????    ServerName dummy-host.example.com
????    ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log"
????    CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common
????</VirtualHost>
????<VirtualHost *:80>
????    ServerAdmin webmaster@dummy-host2.example.com
????    DocumentRoot "/usr/docs/dummy-host2.example.com"
????    ServerName dummy-host2.example.com
????    ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
????    CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common
????</VirtualHost>
????????????????????
??<VirtualHost *:80>
????    DocumentRoot "/Library/WebServer/Documents"
????    ServerName localhost
????    ErrorLog "/private/var/log/apache2/localhost-error_log"
????    CustomLog "/private/var/log/apache2/localhost-access_log" common
????</VirtualHost>
????<VirtualHost *:80>
????    DocumentRoot "/Users/snandy/work"
????    ServerName mysites
????    ErrorLog "/private/var/log/apache2/sites-error_log"
????    CustomLog "/private/var/log/apache2/sites-access_log" common
????<Directory />
????            Options Indexes FollowSymLinks MultiViews
????            AllowOverride None
????            Order deny??allow
????            Allow from all
????  </Directory>
????</VirtualHost>
???????沢???
????:wq