As a user in shared hosting environment I don’t think I have the permission to change/edit these settings.
But I think Apache already loads the .htacess in my Nextcloud folder because the contents of that .htaccess file does have an effect, with this one notable exception: no pretty URLs without index.php.
@nani@nikolasdas if your setup is anything like mine (I’m on Gandi simple hosting) where I don’t have sudo, then here’s a solution if the .htaccess doesn’t update for some reason.
Beware that this works for Nextcloud 10 and might break in the future when paths are updated. So no guarantee.
In addition to the addition of 'htaccess.RewriteBase' => '/', in the config.php, you have to paste this block at the end of your .htaccess. It’s the block which is inserted by the occ maintenance:update:htaccess command:
(Big thanks to @MorrisJobke for giving me the snippet! )
Same here. My .htaccess looks exactly the same at the end as @jan’s.
Probably won’t work unless the pretty URL-rewrite part is going to be compatible with fastCGI in a shared hosting environment (i.e. no root access/permissions).
Given the number of other issues open at Github, I understand it’s not a priority issue and probably won’t be dealt with anytime soon, if ever. So there’s little hope.
Finally, by accident, I seem to have solved this issue: I’ve included 'htaccess.IgnoreFrontController' => true in my config.php.
Then updated the .htaccess file in my web root folder using ./occ maintenance:update:htaccess
That seems to do the trick. Don’t know if it’ll work on your system though (my setup = NC 12.0.1 on a shared CENTOS server, PHP 7). Good luck!
In my case (Nextcloud 10.0.1 on Ubuntu 16.04), this will cause 2 error messages in the admin settings:
The “X-Content-Type-Options” HTTP header is not configured to equal to “nosniff”. This is a potential security or privacy risk and we recommend adjusting this setting.
The “X-Frame-Options” HTTP header is not configured to equal to “SAMEORIGIN”. This is a potential security or privacy risk and we recommend adjusting this setting.
I’ve changed it in .htacces manually to
# Add security and privacy related headers
Header always set X-Content-Type-Options "nosniff"
Header set X-XSS-Protection "1; mode=block"
Header set X-Robots-Tag "none"
Header always set X-Frame-Options "SAMEORIGIN"
Header set X-Download-Options "noopen"
Header set X-Permitted-Cross-Domain-Policies "none"
SetEnv modHeadersAvailable true
Same problem here. occ maintenance:update:htaccess works runs without an error but has no effect. My installation is located under /var/www/virtual/minerva/nextcloud.cjf-berlin.de. What should be the value of htaccess.RewriteBase?
I’d vote to close this topic. It was originally marked as solved and all the other contributions are unorganized, so it is hard to gather all information related to a user and his problem. Many times we are supposing a default debian/ubuntu setup is used with apache + mod_php when it is not the case (admin panels, fcgi, …).