I just installed NC on Ubuntu 16.04. I am seeing the “.htaccess not working” error. /etc/apache2/sites-available/nextcloud.conf
has the AllowOverride All
inside. sudo ls /var/www/nextcloud/data/
shows there is no .htaccess
(there is one at /var/www/nextcloud/
, though). When I check localhost/nextcloud/apps/files/
in my browser I get an Access Forbidden page.
I even tried making a new /var/www/nextcloud/data/.htaccess
file manually following the instructions from from this post but the error persists.
Sorry if there is an obvious answer, I am not very server-savvy. I’ve tried searching through the forums and none of the answers worked.
You should add the override to /etc/apache2/apache2.conf
and test again.
1 Like
Should I modify all of these?
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
Start with /var/www
Give Apache a restart and test, if that fails then do /
1 Like
Thanks for your prompt help! I just started migrating my db from sqlite → mysql and didn’t realize it would put my server in maintainence mode. I’ll get back to you as soon as it’s done.
No dice. I enabled AllowOverride All
on /var/www
, then also /
(running sudo service apache2 restart
after edits) and I still have the error.
I’ve run the permissions script:
richard@rd-server:/var/www/nextcloud$ sudo ls -la data/
total 60860
drwxr-x--- 5 www-data www-data 4096 Feb 18 16:00 .
drwxr-x--- 15 root www-data 4096 Feb 18 11:44 ..
drwxr-x--- 6 www-data www-data 4096 Feb 17 22:18 appdata_ocz19k4h003o
drwxr-x--- 2 www-data www-data 4096 Feb 17 20:55 files_external
-rw-r----- 1 www-data www-data 237 Feb 18 11:20 .htaccess
-rw-r----- 1 www-data www-data 0 Feb 17 20:54 index.html
-rw-r----- 1 www-data www-data 68084 Feb 18 15:57 nextcloud.log
-rw-r----- 1 www-data www-data 0 Feb 17 20:54 .ocdata
-rw-r----- 1 www-data www-data 62218240 Feb 18 14:31 owncloud.db
drwxr-x--- 5 www-data www-data 4096 Feb 17 23:46 rdecal