Configuration of the HTTPS server (ii) configuring the Apache virtual Host

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.