Httpd-vhosts.conf is turned on, the default httpd.conf default configuration is disabled (ensure that the httpd-vhosts.conf file also opens the virtual host configuration, see 3rd), the domain name to access this IP will all point to vhosts.conf The first virtual host in the.
1, first modify the C disk windows\system32\drivers\etc directory of the Hosts file, open with Notepad, add:
127.0.0.1 localhost
127.0.0.1 www.mydomain.com
2.Open httpd-vhosts.conf in httpd.conf
3, in the virtual host settings file xampp\apache\conf\extra\httpd-vhosts.conf set:
Cancel Namevirtualhost *:80 in front of # #
Refer to the following configuration
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/apps/zend-eclipse-php/workspace"
<directory "D:/apps/zend-eclipse-php/workspace" >
Options Indexes MultiViews
AllowOverride None
Order Allow,deny
Allow from all
Require all granted
</Directory>
ServerName send2ocean.com
Errorlog "Logs/send2ocean.com-error.log"
Customlog "Logs/send2ocean.com-access.log" common
</VirtualHost>
<virtualhost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
</VirtualHost>
/span>