Installation outside apache-root directory

Hello, I managed to install Nextcloud and it’s up and running. My apache DocumentRoot is not set to Nextcloud folder, therefore I’m getting errors like:

[authz_core:error] [pid 30499] [client x.x.x.x:65268] AH01630: client denied by server configuration: /var/www/apps

After setting the DocumentRoot to /var/www/nextcloud, the error is not present anymore.
I’d like to have Nextcloud accesible only from the mydomain.com/nextcloud and not directly from mydomain.com.

The current apache config looks like:

Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
  SSLRequireSSL
  Options +FollowSymlinks
  AllowOverride All
  Require all granted
  Satisfy Any
 <IfModule mod_dav.c>
  Dav off
 </IfModule>
 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud
</Directory>

DocumentRoot /var/www

Many thanks,
Peter

You need to set the Documentroot to /var/www

Well, the DocumentRoot is currently set to /var/www, and therefore I’m getting the error message…

I think in my environment it is set so /var/www/html

Try that out.

It didn’t help, now it’s looking in the /var/www/html

AH01630: client denied by server configuration: /var/www/html/apps

I was looking for some nextcloud option, but didn’t find any…

@pse I’ll take a look an my configuration after work and will post it here, than you can try it out.