0

I've just installed Nextcloud on my Ubuntu server. Followed the steps in the docs but at the point where I'm supposed to see Nextcloud front page running on localhost port 80 I'm getting "Forbidden. You don't have permision to access this resource".

Despite the fact that I ran sudo chown -R www-data:www-data /var/www/html/nextcloud and also sudo chmod -R 755 /var/www/html/nextcloud

port 80 is allowed in ufw and Apache reports "active" when checking the its status.

What else do I need to check ?

access.log:

86.178.239.208 - neo [16/Aug/2020:14:31:21 +0100] "PROPFIND /remote.php/webdav/Photos/com.ubuntu.camera HTTP/1.1" 207 1254 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:21 +0100] "PROPFIND /remote.php/webdav/Photos/com.ubuntu.camera HTTP/1.1" 207 1254 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:23 +0100] "PROPFIND /remote.php/webdav/Photos HTTP/1.1" 207 1236 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:23 +0100] "PROPFIND /remote.php/webdav/Photos/com.ubuntu.camera HTTP/1.1" 207 1254 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:23 +0100] "PROPFIND /remote.php/webdav/Photos/ HTTP/1.1" 207 3874 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:30 +0100] "PROPFIND /remote.php/webdav HTTP/1.1" 207 1795 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:30 +0100] "PROPFIND /remote.php/webdav/Photos HTTP/1.1" 207 1236 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:30 +0100] "PROPFIND /remote.php/webdav HTTP/1.1" 207 3655 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:35 +0100] "PROPFIND /remote.php/webdav/Photos HTTP/1.1" 207 1236 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:35 +0100] "PROPFIND /remote.php/webdav/Photos/com.ubuntu.camera HTTP/1.1" 207 1254 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:31:35 +0100] "PROPFIND /remote.php/webdav/Photos/ HTTP/1.1" 207 3874 "-" "gvfs/1.44.1"
86.178.239.208 - neo [16/Aug/2020:14:33:09 +0100] "PROPFIND /remote.php/caldav/calendars/neo/personal/ HTTP/1.1" 207 5345 "-" "Evolution/3.36.4"
196.216.92.201 - - [16/Aug/2020:15:50:51 +0100] "GET / HTTP/1.1" 403 440 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
212.3.160.181 - - [16/Aug/2020:16:09:22 +0100] "GET / HTTP/1.1" 403 440 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
89.248.167.131 - - [16/Aug/2020:16:37:07 +0100] "GET / HTTP/1.1" 403 440 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
89.248.167.131 - - [16/Aug/2020:16:37:07 +0100] "GET /robots.txt HTTP/1.1" 403 440 "-" "-"
89.248.167.131 - - [16/Aug/2020:16:37:07 +0100] "GET /sitemap.xml HTTP/1.1" 403 440 "-" "-"
89.248.167.131 - - [16/Aug/2020:16:37:08 +0100] "GET /.well-known/security.txt HTTP/1.1" 403 440 "-" "-"
89.248.167.131 - - [16/Aug/2020:16:37:08 +0100] "GET /favicon.ico HTTP/1.1" 403 496 "-" "python-requests/2.10.0"
127.0.0.1 - - [16/Aug/2020:16:41:24 +0100] "GET /nextcloud HTTP/1.1" 403 491 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
127.0.0.1 - - [16/Aug/2020:16:41:58 +0100] "GET / HTTP/1.1" 403 491 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"
127.0.0.1 - - [16/Aug/2020:16:46:52 +0100] "GET /nextcloud HTTP/1.1" 403 491 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0"

error.log:

[Sun Aug 16 16:58:41.249455 2020] [mpm_prefork:notice] [pid 3254] AH00169: caught SIGTERM, shutting down
[Sun Aug 16 16:59:51.034763 2020] [mpm_prefork:notice] [pid 1043] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1g configured -- resuming normal operations
[Sun Aug 16 16:59:51.182429 2020] [core:notice] [pid 1043] AH00094: Command line: '/usr/sbin/apache2'
[Sun Aug 16 17:16:46.340199 2020] [authz_core:error] [pid 1099] [client 127.0.0.1:43050] AH01630: client denied by server configuration: /var/www/html/nextcloud/nextcloud
[Sun Aug 16 17:18:48.842398 2020] [authz_core:error] [pid 1095] [client 185.39.11.105:36758] AH01630: client denied by server configuration: /var/www

nextcloud.conf:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/nextcloud
    ServerName utcloud.ddns.net

    Alias /nextcloud "/var/www/html/nextcloud/"

    <Directory /var/www/html/nextcloud/>
      Require all granted
      AllowOverride All
      Options FollowSymLinks MultiViews

      <IfModule mod_dav.c>
        Dav off
      </IfModule>

    </Directory>

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

</VirtualHost>

the above config is pulled by apache2.conf.

3
  • Sorry, I didn't mention that but I did. Will update the post with logs.
    – Mark
    Aug 16, 2020 at 16:38
  • Apparently there's a misconfiguration in the server. Funny, how can this be if I followed the docs ?
    – Mark
    Aug 16, 2020 at 16:40
  • As you can see port 80 is assigned to nextcloud.conf and is enabled by sudo a2ensite nextcloud.conf.
    – Mark
    Aug 16, 2020 at 16:44

1 Answer 1

0

As turned out I had to disable the default config in /etc/apache2/sites-available/000-default.conf which also was routing to port 80. It was basically taking nextclouds config file's spot. Once disabled, nextcloud.conf kicked in.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .