Hi,
i will access my nextCloud server via a reverse proxy, but I get an error message in the nextCloud webinterface:
This directory is unavailable, please check the logs or contact the administrator
My setup:
Proxy with apache2 --> nextcloud server
the url http://192.168.1.10/nextcloud should point to http://192.168.1.20/
The vhost for 192.168.1.10:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPreserveHost On
ProxyPass /nextcloud http://192.168.1.20:8080/
ProxyPassReverse /nextcloud http://192.168.1.20:8080/
ServerName 192.168.1.10
</VirtualHost>
The vhost for 192.168.1.20:
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName 192.168.213.49
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/>
Options +FollowSymlinks
AllowOverride All
Allow from all
</Directory>
TransferLog /var/log/apache2/nextcloud_access.log
ErrorLog /var/log/apache2/nextcloud_error.log
</VirtualHost>
The nextcloud config:
<?php
$CONFIG = array (
'trusted_domains' =>
array (
0 => '192.168.1.10',
1 => '192.168.1.20',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '12.0.4.3',
'dbname' => 'nextclouddb',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => 'passwort',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
"trusted_proxies" => ['192.168.1.10'],
"overwritehost" => "192.168.1.10",
"overwriteprotocol" => "http",
"overwritewebroot" => "/nextcloud",
"overwrite.cli.url" => "http://192.168.1.10/nextcloud",
);
I tried a lot of config options but nothing helps. The webinterface is accessable but the message regarding the data directory is still there.
Perhaps somebody knows what I have to do to deal with that.