Here's how to add some named localhosts to your OS X setup:

1. open the NetinfoManager and become admin under the domain menu > security > authenticate.

2. duplicate the localhost entry under the machines entry

3. rename this copy to your prefered sitename (www.yoursitename1.dev), I used ".dev" because it's not used on the internet!

4. open your terminal.app and SU to root

(������ � ���� ������ �� ����������, ���� su to root, ����� ������, � ������� ������� su: Sorry
�������� �������������� ��� root)

5. type 'open -e /private/etc/httpd/httpd.conf' (without the quotes)

6. find "#NameVirtualHost" in httpd.conf file

7. change this into: "NameVirtualHost *" (remove the # and add the *, don't type the quotes)

8. at the end of the file, make an entry like this:

<VirtualHost *>
DocumentRoot /Library/WebServer/www.yoursitename1.dev
ServerName www.yoursitename1.dev
</VirtualHost>
9. in your /Library/WebServer/ folder, make an folder named like above (www.yoursitename1.dev)

10. want more virtual hosts? do step 2 & 3 (www.yoursitename2.dev, www.yoursitename3.dev enz..)

11. repeat step 8 & 9



-----
Machelp; policy & news @ http://www.macrules.ru

Ответить