Ubuntu下如何配置虚拟目录?

一、cd /etc/apache2/sites-enabled
在该目录下新建一个文件:
文件内容类似:

ServerName a.test.com
DocumentRoot /home/web/test-com

Options All
AllowOverride All
Order allow,deny
allow from all

二、重启apahce2:
/ettc/init.d/apache2 restart

注:a.test.com为你的网站域名, /home/web/test-com为域名对应目录

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>