【问题标题】:LAMP multiple websitesLAMP 多个网站
【发布时间】:2011-07-24 17:16:32
【问题描述】:

我是 Ubuntu 的新手。安装灯。有几个问题

1) 假设第一个网站目录看起来像:var/www/first/ 和第二个网站:var/www/second。如何设置多个网站,并将它们与 IIS 上的单独端口(如 http://localhost:81/http://localhost:82/ )一起使用?

2) 我如何更改网络服务器的默认位置(默认为 var/www)或确切的网站?

提前谢谢

【问题讨论】:

    标签: php ubuntu web lamp


    【解决方案1】:

    1) 在您的 apache 配置中创建 virtual hosts。在我安装的 Ubuntu(较旧)上,配置文件是 /etc/apache2/sites-enabled/000-default。

    2)在1中提到的配置文件中,可以更改默认站点的DocumentRoot。

    【讨论】:

      【解决方案2】:

      1) 在您的 Apache httpd.conf 中配置一个新的虚拟主机。

      http://httpd.apache.org/docs/2.0/vhosts/examples.html

      2) 在您的 Apache httpd.conf 中,将 DocumentRoot 更改为您的“新”文件夹。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-06-17
        • 2012-05-21
        • 2021-06-29
        • 1970-01-01
        • 1970-01-01
        • 2012-07-10
        • 2013-03-10
        • 2014-02-26
        相关资源
        最近更新 更多