apache2.4 Configuring virtual Directories

Source: Internet
Author: User

Just start learning, follow Hanshunping Teacher's video courseware study ing~

This is your own configuration of the virtual directory problems and solutions, recorded ~

---------------------------Split Line June-------------------------------

My Apache installation directory is E:\apache\Apache24

The directory you want to configure is a Web page file in D:\myblog

    • Step1 adding a virtual directory node

Locate the httpd.conf file in E:\apache\Apache24\conf and add the code in the Red box

    • Step2 Comment DocumentRoot Path

    • Step3 Test (first reboot Apache)

Http://localhost:8080/myblog

According to the teacher's tutorial, in theory this can be successful. But I test error, at this time realize may be different version of the problem, my is 2.4 version, Han teacher is 2.2 version ~

And then I find the wrong ~

--------------------------------Split Line June------------------------------------------------------------------------------------- ----------------------

    • At this point, the Apache error is restarted, such as

    • Check the cause of the error, because I just modified the httpd.conf file, so it must be the file problem, so look for the specific code problem.

Method: Go to cmd and enter the Apache installation directory (specifically your own installation directory) \bin>

Input httpd.exe-w-n "Apache2.4"-K Start

(Apache2.4 in quotation marks is modified to your Apache service name, my version is 2.4.20, service name is Apache2.4, can be found in the computer service, such as)

Tip 288 When there is a problem (hint: Syntax error on the line 288 of ...). Invalid command ' Order ' ...), such as

    • Why ' Order ' is problematic--version issue

In the Apache2.4 version, the new access control configuration syntax supported by Mod_authz_host is provided.

In the 2.2 version of the order, allow and other commands in the new version can also be compatible with the module to achieve this compatibility is mod_access_compat.

So after load this module, apache2.4 will be able to recognize these statements.

At this time Apache restarted successfully, so happy to test, but ...

    • From the literal meaning understanding, this should be the access permission issue, commented out require all denied, as follows

Reboot Apache, test successful

apache2.4 Configuring virtual Directories

Related Article

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.