1 httpd.conf
Open ithttpd.confSearch for Characters "# Virtual hosts, remove the comment from the following line as follows. The aim is to makeApacheLoad after reboothttpd-vhosts.confFile. 2 Openconf/extra/httpd-vhosts.confNamevirtualhost *:80//enable domain-based virtual hosts, if not, only the first oneVirtualHostThe configuration item will take effect. <virtualhost *:80> ServerAdmin[email protected]. com/webmaster mailbox.
DocumentRoot "D:/apache2.2/docs/ok"//Virtual host project directory. ServerName ok.com//host name.
Serveralias www.ok.com//host alias.
Errorlog "Logs/ok.com-error.log"//Virtual host error log.
Customlog "Logs/ok.com-access.log" common//virtual host access log.
</VirtualHost> 3 error correction if 404 or not Found errors occur, you can checkVirtual Host project directoryis incorrect. If the above error occurs, the virtual host project directory can be repaired.
Apache configuration Virtual host, new Pro test (domain-based)