The client lacks sufficient authorization

I don’t think nextclouds .htaccess allows naked file access. I think you need edit it’s http vhost to provide some folder for LE challenge

So what do I have to add to /etc/apache2/sites-available/000-default.conf?

I don’t know, what’s in it?

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin Matthias@localhost
        DocumentRoot /var/www/nextcloud
        ServerName countomega.ddnsfree.com

    <IfModule mod_rewrite.c>
        RewriteCond %{REQUEST_FILENAME} !.well-known/
        RewriteRule "(^|/)\.(?!well-known)" - [F]
    </IfModule>
       # Redirect permanent / https://countomega.ddnsfree.com

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

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

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
<VirtualHost *:443>
 ServerAdmin Matthias@localhost
        DocumentRoot /var/www/nextcloud
        ServerName countomega.ddnsfree.com
         <IfModule mod_rewrite.c>
        RewriteCond %{REQUEST_FILENAME} !.well-known/
        RewriteRule "(^|/)\.(?!well-known)" - [F]
         </IfModule>
  #  <IfModule mod_headers.c>
   #   Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
  # </IfModule>
 </VirtualHost>

can you put a file and test it?

/var/www/nextcloud/.well-known/acme-challenge/1234

I already did it. Still getting a not availiable error.

But now I get apachectl fullstatus
/usr/sbin/apachectl: 113: /usr/sbin/apachectl: www-browser: not found
'www-browser -dump http://localhost:80/server-status' failed.
Maybe you need to install a package providing www-browser or you
need to adjust the APACHE_LYNX variable in /etc/apache2/envvars

Perhaps your rewrite rule is wrong. Deactivate these (add # to these rows).

Still no luck with trying this…

As it looks like it’s your personal nextcloud, if you can afford some downtime, try this.

sudo certonly --standalone --preferred-challenges http -d countomega.ddnsfree.com --pre-hook "systemctl stop apache2" --post-hook "systemctl start apache2"

Sadly this didn´t work out, too. I fixed an apache error so apachectl fullstatus now throws
Link: mask-icon
Link: manifest
This application requires JavaScript for correct operation. Please enable
JavaScript and reload the page.

                                   Nextcloud

   _____________________ Username or email

   _____________________ Password

   [ Log in ]
   Forgot password?

   Nextcloud - a safe home for all your data

So this seems to work, but somehow the server has a wrong certificate, I think.

So now I´ve switched to countomega.dnshome.de but still getting the Failed authorization procedure error. Any ideas?

SSL isn´t configured, and neither I get the ssl error.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.