Ubuntu 6.06的LAMP环境入门

豆豆网   技术应用频道   2007年02月27日  【字号: 收藏本文

本文详细介绍Ubuntu 6.06的LAMP环境入门

  1.将 “File or directory to add virtual servers to”设置成 “/etc/apache2/sites-available/default”. 这条改动对多站点的设置有用

  2.将 "Directory to create links in for new virtual servers"设置成 "/etc/apache2/sites-enabled/000-default".本条将开启指定的虚拟站点

  (大概类似下图)

  

3. 向下滚动进入到“system configuration” 并且将“server root directory” 设置成 “/etc/apache2”.

  4. 将 “path to httpd executable” 设置成 “/usr/sbin/apache2ctl”.

  5. 将 “path to apache2ctl”设置成 “/usr/sbin/apache2ctl”.

  6.将 “command to start apache” 设置成 “/etc/init.d/apache2 start”

  7. 将 “command to stop apache” 设置成 “/etc/init.d/apache2 stop”

  8. 将下面所有的apche改为apache2,效果类似下图。

  

完成以上步骤后保存,再回到 “apache webserver”图标,然后重新启动 apache2. 为了使外部用户可以访问到你的网站,你应该开放机器的80号端口,如果网站的端口设置成8080,还需要在DNS服务器中设定正确的记录。

  现在开始测试网站。首先为你的机器准备一个公网IP地址,不要使用内网私用地址 (比如192.168.x.x这样的地址) ,内网私用IP地址无法被外网用户访问到。在上网电脑中输入你机器的公网IP地址,你将会看到Apache2的默认页,这表明Apache2 软件已经工作正常。

作者:老王    责编:豆豆技术应用

正在加载评论...