开发者

LAMP multiple websites

I'm newbie to Ubuntu. Installed LAMP. Have several questions about it

1) let's say first websites dir looks like : var/www/fi开发者_开发技巧rst/ and second ones: var/www/second. How can i set up multiple website, and use them with seperate ports (like http://localhost:81/ and http://localhost:82/ ) as on IIS?

2) How can i change default location of webserver (default is var/www) or exact website?

Thx in advance


1) Create virtual hosts in your apache configuration. On my install of Ubuntu (which is older), the configuration file is /etc/apache2/sites-enabled/000-default.

2) In the configuration file mentioned in 1, you can change the DocumentRoot of the default site.


1) In your Apache httpd.conf configure a new virtualhost.

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

2) In your Apache httpd.conf change the DocumentRoot to your "new" folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜