首页 > 技术文章 > ubuntu 和 centOS 的apache设置

xuxiang 2013-06-17 14:31 原文

更改ubuntu的网站访问根目录:

在sudo gedit /etc/apache2/sites-enabled/000-default,把

DocumentRoot /var/www      #这里改成你想要的目录地址,比如/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>      #这里改成和上面一样的路径,试过不改访问没有权限
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

推荐阅读