针对centos6搭建的httpd服务
1. yum install httpd
2. 配置文件 /etc/httpd/conf/httpd.conf , 一般默认的配置文件是可以使用的
常用的就是
Listen 80
DocumentRoot "/var/www/html"
3. 在/var/www/html 下存放你想要在浏览器中显示的文件。
=====================================================================
途中遇到一个问题, 我在/var/www/html/ 存放了一个软连接目录,但是在浏览器中只显示test普通目录, 软连接的东西并不显示
[root@localhost ~]# ll /var/www/html/zn-test/ -l
总用量 4
lrwxrwxrwx. 1 root root 15 1月 14 23:16 rpmbuild -> /root/rpmbuild/
lrwxrwxrwx. 1 root root 15 1月 14 23:11 SPECS -> rpmbuild/SPECS/
drwxr-xr-x. 2 root root 4096 1月 14 23:14 test
经过搜索大量文献执行 chmod +x /root