Apache的安装和配置相关信息收集

修改主配置文件 httpd.conf
vim /etc/httpd/conf/httpd.conf
配置Apache的根目录为ServerRoot "/etc/httpd", 设置客户端访问超时时间为Timeout 120秒,这两个设置为系统默认
设置httpd监听端口 Listen 80
设置管理员E-mail地址 ServerAdmin [email protected]
设置WEB服务器的主机名和监听端口 ServerName 192.168.1.100:80
设置Apache文档目录为/var/www/html DocumentRoot "/var/www/html"
设置主页文件为index.html DirectoryIndex index.html
设置服务器的默认编码为GB2312 AddDefaultCharset GB2312

注释掉Apache默认欢迎页面
vim /etc/httpd/conf.d/welcome.conf
将welcome.conf中的下面四行代码注释掉

Options -Indexes
ErrorDocument 403 /error/noindex.html

如果不注释掉,那么在测试自己的网站时则会打开系统Test Page页面,而不是我们自己的网页
Tags: 

延伸阅读

最新评论

发表评论