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