Hello everyone,
i just did a fresh install of nextcloud on a proxmox lxc behind an apache reverse proxy. I managed to access nextcloud locally and via the internet.
Now i wanted to install the nextcloud linux client on my pc, but i couldn’t grant the client access to my server. I read that i could solve the problem by adding the line
'overwriteprotocol' => 'https',
to the config.php file. If I do this it indeed works, but then I can’t access the nextcloud server directly over it’s local ip address anymore. I guess it’s because the server expects a https-request but i try to access it via a http-request.
So how can i solve this problem?
Here’s my config.php
<?php
$CONFIG = array (
'trusted_domains' =>
array (
0 => 'cloud.local',
1 => '192.168.0.99',
2 => 'mydomain.org',
),
'datadirectory' => '/mnt/hdd/data/',
'dbtype' => 'mysql',
'version' => '19.0.0.12',
'overwrite.cli.url' => 'http://cloud.local',
'overwriteprotocol' => 'https',
'dbname' => '',
'dbhost' => '',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '',
'dbpassword' => '',
'installed' => true,
'htaccess.RewriteBase' => '/',
);
And the .conf file of the reverse proxy
<VirtualHost *:80>
ServerName mydomain.org
ProxyPreserveHost On
DocumentRoot /var/www/html
ProxyPass /.well-known !
ProxyPass / http://192.168.0.99:80/
ProxyPassReverse / http://192.168.0.99:80/
RewriteEngine on
RewriteCond %{SERVER_NAME} =mydomain.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>