I. Configuring the httpd.conf file
turn on the Vhost module
Include the corresponding file
[Email protected] bin]# vim/etc/httpd/httpd.conf
LoadModule vhost_alias_modulemodules/mod_vhost_alias.so
Include/etc/httpd/extra/httpd-vhosts.conf
Comment this out.
#DocumentRoot "/usr/local/apache/htdocs"
Second, configuration httpd-vhost.conf file
[Email protected] bin]# vim/etc/httpd/extra/httpd-vhosts.conf
Comment out the examples given
Add the following
<virtualhost 192.168.66.100:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache/htdocs/www.huangbaoying.com"
ServerName www.huangbaoying.com
Errorlog "Logs/www.huangbaoying.com-error_log"
Customlog "Logs/www.huangbaoying.com-access_log" common
</VirtualHost>
Third, write the index.html in the DocumentRoot you specify
and then save.
iv. Add in your local hosts file
This file is
C:\Windows\System32\drivers\etc
192.168.66.100 www.hby.com
and then save
v. Re-launch Apache
Shutting down the firewall
visit www.hby.com in the browser to see if you can access
This article is from the "rush to the Internet" blog, be sure to keep this source http://huangbaoying.blog.51cto.com/9267029/1604724
Configuration of the HTTPS server (ii) configuring the Apache virtual Host