Just as an example of what your
xampp\apache\conf\extra\httpd-vhosts.conf file might look like:
- Code: Select all
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/xampp/xampp/htdocs"
</VirtualHost>
NameVirtualHost 10.10.10.1
NameVirtualHost 168.168.168.168
<VirtualHost 10.10.10.1 168.168.168.168>
ServerName domain.name
ServerAlias www.domain.name
DocumentRoot "C:/xampp/xampp/htdocs//www/server1"
ServerAdmin webmaster@domain.name
<Directory "C:/xampp/xampp/htdocs//www/server1">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/domainname.log
CustomLog logs/domainname.log common
</VirtualHost>
Of course the paths will be your actual paths and the names and IPs will be your actual IPs.
Don't forget to restart apache when making changes to conf files and always backup the conf files before editing.
Make sure the network administrator has allowed the ports required for your server on your local network to be opened.
Your windows host file:
C:\Windows\system32\drivers\etc\hosts
should also be edited, by dragging into your text editor, with for example:
127.0.0.1 localhost
10.10.10.10 domain.name
Save As
hosts
Done.