LAMP多个网站

时间:2011-07-24 17:16:33

标签: php ubuntu web lamp

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

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

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

提前谢谢

2 个答案:

答案 0 :(得分:4)

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

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

答案 1 :(得分:1)

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

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

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