1. download apache:
http://www.apachelounge.com/download/VC11/
2. install V11 微软组件
https://www.microsoft.com/en-us/download/confirmation.aspx?id=30679
3. install apache under directory c:\Apache24. No need to change conf\httpd.conf. Else DocumentRoot, ServerRoot need to be changed.
4. update port conf\httpd.conf. Find 'Listen 80' in the file and change the port
5. go to command window and start httpd
6. try url http://localhost:8080/
httpd.conf
a.DocumentRoot 用于设置网页目录的来源
DocumentRoot "C:/zd_dev/dojo175"
b.directory 用于设置目录和文件的各种属性, 如:是否允许访问,如果不设置,默认为不允许访问
<Directory "C:/zd_dev/dojo175">
AllowOverride None
Require all granted
<Files "splice.html">
Require all denied
</Files>
</Directory>
c. Alias, 允许设置DocumentRoot外的网页来源
Alias "/93" "C:/zd_dev/dojo193/"
<Directory "C:/zd_dev/dojo193">
AllowOverride None
Require all granted
</Directory>
http://localhost:8080/93/date.html, 则访问目录"C:/zd_dev/dojo193/"中的date.html
d.Redirect 重定向url到其他网站
Redirect "/foo/" "http://www.baidu.com"
Redirect "/ex/" "http://stock.hexun.com/"