【发布时间】:2011-07-24 17:16:32
【问题描述】:
我是 Ubuntu 的新手。安装灯。有几个问题
1) 假设第一个网站目录看起来像:var/www/first/ 和第二个网站:var/www/second。如何设置多个网站,并将它们与 IIS 上的单独端口(如 http://localhost:81/ 和 http://localhost:82/ )一起使用?
2) 我如何更改网络服务器的默认位置(默认为 var/www)或确切的网站?
提前谢谢
【问题讨论】:
我是 Ubuntu 的新手。安装灯。有几个问题
1) 假设第一个网站目录看起来像:var/www/first/ 和第二个网站:var/www/second。如何设置多个网站,并将它们与 IIS 上的单独端口(如 http://localhost:81/ 和 http://localhost:82/ )一起使用?
2) 我如何更改网络服务器的默认位置(默认为 var/www)或确切的网站?
提前谢谢
【问题讨论】:
1) 在您的 apache 配置中创建 virtual hosts。在我安装的 Ubuntu(较旧)上,配置文件是 /etc/apache2/sites-enabled/000-default。
2)在1中提到的配置文件中,可以更改默认站点的DocumentRoot。
【讨论】:
1) 在您的 Apache httpd.conf 中配置一个新的虚拟主机。
http://httpd.apache.org/docs/2.0/vhosts/examples.html
2) 在您的 Apache httpd.conf 中,将 DocumentRoot 更改为您的“新”文件夹。
【讨论】: