配置httpd服务

自身系统:Fedora 16 32位版本

1.yum install httpd
     使用systemctl start httpd.service命令,再在浏览器里输入自己的IP地址(比如http://192.168.1.89)会显示Fedora test page页面;
2.vim /etc/httpd/conf/httpd.conf
add:
---------------------------------------
Alias /cc "/home/cheney/"
<Directory "/home/cheney/">
    #AllowOverride None
    #DirectoryIndex index.cgi
    #AddHandler cgi-script .cgi
    #Options +ExecCGI
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
----------------------------------
/cc :就是你可以访问的地址后跟的目录,比如访问192.168.1.89/cc,就会看到/home/cheney目录下的东西
AllowOerride,Order allow,Allow:权限设置

3.给你上面文档里指定目录的权限
chmod -R 755 /home/cheney

4.重启服务
systemctl restart httpd.service
5.下次开机默认启动
systemctl enable httpd.service

6.同局域网内的其他机器,在浏览器里访问http://192.168.1.89/cc 就可以看到你电脑目录下/home/cheney的内容

你可能感兴趣的:(httpd)