the .htaccess file does not work

时间:2019-08-20 17:58:32  来源:igfitidea点击:

访问owncloud时,报错:

Your data directory and files are probably accessible from the internet because the .htaccess file does not work

要解决这个问题。我们只需更正apache配置文件。

在owncloud.conf文件。编辑在VirtualHost标记中的下面3行。

AllowOverride All
Order allow,deny
allow from all

重启apache2之后

/etc/init.d/apache2 restart

设置参考:

root@Hyman:/etc/apache2/conf.d# cat owncloud.conf
<VirtualHost Hyman.localdomain:80>
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www/owncloud/

     <Directory var www owncloud>
              Options Indexes FollowSymLinks MultiViews
              AllowOverride All
              Order allow,deny
              allow from all
     </Directory>
 ErrorLog ${APACHE_LOG_DIR}/error.log

      # Possible values include: debug, info, notice, warn, error, crit,
      # alert, emerg.
      LogLevel warn

      CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
root@Hyman:/etc/apache2/conf.d#