Linux As4下搭建LAMP

Category : 工作学习 / Tags : , , , / Date : 2006.10.24 / /

   2.4.2)配置ServerName
   

   #cd /usr/local/apache2/conf
   #vi httpd.conf

   # ServerName gives the name and port that the server uses to identify itself.
   # This can often be determined automatically, but we recommend you specify
   # it explicitly to prevent problems during startup.
   #
   # If your host doesn't have a registered DNS name, enter its IP address here.
   #
   #ServerName www.example.com:80(去掉"#",修改ServerName为你的IP或域名)

   2.4.3)配置主目录
   

     #cd /usr/local/apache2/conf
   #vi httpd.conf

      #将用户web目录改成/var/www/html(你也可以指定为其他目录)
    

    DocumentRoot "/var/www/html"
     

      #加上缺省索引文件名index.htm,在DirectoryIndex行后加入index.htm
   

   DirectoryIndex index.html index.html.var index.htm
   

   2.5)编辑测试文件
    用vi或文本编辑器编辑如下内容的文件,保存为/var/www/html/index.htm
  

        <html>
        <head>
           <title>我的测试页</title>
        </head>
        <body>
        这是我的第一个测试页!<br>
        This is my first test webpage!
        </body>
        </html>

    2.6)测试apache
   

   #cd /usr/local/apache2/bin
   #./apachectl start

   现在在浏览器里输入ip或域名就可以显示看到你的测试页。



无觅相关文章插件,快速提升流量

Pages: 1 2 3 4 5 6

Comments

One Response to “Linux As4下搭建LAMP”

Leave a Reply

You must be logged in to post a comment.

传奇 似水流年 绽放 风筝 八月照相馆