官方reference:
httpd主要是一个静态文件服务器。当然不限于此,通过各种mod,httpd也可以作为一个前端服务器,把请求转发到servlet container、cgi等。不过主要还是静态文件服务器,所以官方的reference也是从处理静态文件说起
1. DocumentRoot
首先要把浏览器里的url,映射到server的文件系统上
这是通过DocumentRoot directive配置的(httpd的各种配置,都是用directive完成的,各种mod提供了不同的directive)
DocumentRoot "/usr/local/httpd/htdocs"
<IfModule dir_module> DirectoryIndex index.html </IfModule>
因篇幅问题不能全部显示,请点此查看更多更全内容