.htaccess does not work

After the installation of NC 10. I got the htaccess failure. According to some Topics in the forum I have to replace „AllowOverride None“ with „AllowOverride All“ so I opened the nextcloud-le-ssl.conf in /etc/apache2/sites-avialable.

Which looks like this right now:

<IfModule mod_ssl.c>
<VirtualHost *:443>
 DocumentRoot "/var/www/nextcloud"
 ServerName mydomain.ddns.net

 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/nextcloud/>
 Options +FollowSymlinks
 AllowOverride All

 <IfModule mod_dav.c>
 Dav off

<IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud
 Satisfy Any

SSLCertificateFile /etc/letsencrypt/live/mydomain.ddns.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.ddns.nett/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

But this isn’t fixing anything :frowning:

Now I am asking myself and you is this even the right config file?
Maybe there Is a way to be sure that the files aren’t avialable from unauthorized users.

Thank you for your help
Best regards


Just to be 100% sure you’re configuring the right file, go to
cd /etc/apache2/sites-enabled

and have a look with
ls -l

which sites are actually enabled. You will see softlinks there to the sites in /etc/apache2/sites-available and from this links you can tell which config files are actually used.

You can open the ssl.conf file from this very directory:
less /etc/apache2/sites-enabled/ssl.conf (enter correct file name)

I hope this was the problem already and I brought you on the right track.

Best regards

Thank you for your reply :slight_smile:

Same there (etc/apache2/site-enabled) :frowning:
AllowOverride in /var/www/nextcloud was already set as All. Same in the Http config.
So i tried to download a file from the server from another computer. I opened a file copied the addressline from the Browser and tried the download it with sudo wget “address” and got Username/Password Authentication failed…
Maybe the files aren’t reachable from the internet?

First about the sites-enabled:

if you do a ls -l /etc/apache/sites-enabled/ you see that that files are only links to …/sites-available/,
so apache custe creates a link if you enable it with a2ensite.

about the htaccess, do you see anything in the error.log of apache about that?

You will likely also need to make the same changes in /etc/apache2/apache2.conf

thank you for your help!!! I did it :slight_smile: