码迷,mamicode.com
首页 > Web开发 > 详细

linux apache的httpd

时间:2017-05-17 18:25:33      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:http   index   document   error   虚拟   目录   html   日志   where   

1.安装:yum -y install httpd

   查找:whereis httpd

2.启动:service httpd start

   在windows地址栏输入ip地址,端口默认80

3.cd /var/www/html

   echo "hello apache" > index html

    ll

   mv index html demo html

4.cd /etc/httpd

  pwd

  ll

  httpd]:ll conf

  httpd]:ll conf.d

 httpd]:vi /conf/httpd.conf

配置文件:listen :端口:80

             document root:站点目录

             servername:主机名,域名

            directory:配置站点目录参数

            directory index:配置站点目录,默认首页

            errorlog:错误日志

            customlog:访问日志

            virtual host:虚拟主机配置节

5.创建目录:mkdir /var/www/baseip1

                 ....................../baseip2

                 ....................../port 81

                 ....................../port 82

                ......................./school

                ......................./person

6.conf.d]:vi virtual

              base  :id

              base:port

              base:domain

 

linux apache的httpd

标签:http   index   document   error   虚拟   目录   html   日志   where   

原文地址:http://www.cnblogs.com/wanglisong/p/6868748.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!