apache2.4 Virtual Host Configuration

Source: Internet
Author: User

A lot of online tutorials, just record my configuration, available for reference

I. Modification of HTTPD.CONF

Open the Appserv installation directory, locate the httpd.conf file, and remove the # number in front of the following two lines, respectively.

[Plain]View PlainCopy
    1. #LoadModule Vhost_alias_module modules/mod_vhost_alias.so

Remove # means enable Apache's virtual host feature.

[Plain]View PlainCopy
    1. #Include conf/extra/httpd-vhosts.conf

To get rid of this line, it means to import the virtual host configuration from the conf/extra/httpd-vhosts.conf file.

Ii. Modification of httpd-vhosts.conf
<virtualhost *:80> ServerAdmin [email protected] documentroot "E:\developer\Apache24\htdocs" Servernam e localhost</virtualhost><virtualhost *:80> ServerAdmin [email protected] DocumentRoot "E:\develope R\www\a.sivkun.com "ServerName a.sivkun.com #ServerAlias www.dummy-host.example.com #ErrorLog" Logs/dummy-host.ex Ample.com-error.log "#CustomLog" logs/dummy-host.example.com-access.log "Common <directory" E:\developer\www\        A.sivkun.com "> Options Indexes followsymlinks allowoverride all Require all granted </directory></virtualhost><virtualhost *:80> ServerAdmin [email protected] DocumentRoot "E:\developer\www\b.sivkun.com" ServerName b.sivkun.com <directory "E:\developer\www\b.sivkun.com" > Opt Ions Indexes followsymlinks allowoverride all Require all granted </directory></virtualhost>& Lt VirtualHost *:80>   ServerAdmin [email protected] documentroot "E:\developer\www\c.sivkun.com" ServerName c.sivkun.com <di  Rectory "E:\developer\www\c.sivkun.com" > Options Indexes followsymlinks allowoverride None Require All granted </Directory></VirtualHost>
Iii. modification of the hosts

Windows Path: C:\Windows\System32\drivers\etc\hosts

127.0.0.1 localhost127.0.0.1 a.sivkun.com127.0.0.1 b.sivkun.com127.0.0.1 c.sivkun.com

Referenced by: http://blog.csdn.net/zm2714/article/details/8351342

apache2.4 Virtual Host Configuration

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.