nextcloud/impersonate

Impersonate HTTPS does not work

Closed this issue · 0 comments

[EDIT] Managed to solve it by myself throught some Google searches and some sleepless nights!

Hi,
I'm here to ask if someone could help me figure out how to make impersonate works with HTTPS.

When I'm using HTTP I can see the impersonate button and everything works fine but, as soon as I switch to HTTPS, the button disappears and I don't understand if it's an expected behaviour or not.

I'm currently running:

  • Rocky Linux 8.5
  • Nextcloud 23.0.3.2
  • PHP 7.4.28
  • PostgreSQL 13.6

This is how I configured the nextcloud.conf in /etc/httpd/conf.d/nextcloud.conf

<Directory "/var/www/html/nextcloud/">
    Options FollowSymLinks MultiViews
    AllowOverride All
    #Require all granted
    Require ip 127.0.0.1 192.168.2.0/24

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

# this configuration requires mod_ssl, mod_socache_shmcb, mod_rewrite, and mod_headers
<VirtualHost *:80>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>

<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile      /etc/httpd/certs/apache.crt
    SSLCertificateKeyFile   /etc/httpd/certs/apache.key

    # enable HTTP/2, if available
    Protocols h2 http/1.1

    # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
    Header always set Strict-Transport-Security "max-age=63072000"

    DocumentRoot /var/www/html/nextcloud
    ServerName 192.168.2.101
</VirtualHost>

# modern configuration
SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1 -TLSv1.2
SSLHonorCipherOrder     off
SSLSessionTickets       off

SSLUseStapling On
SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"

And this is the config.php file

<?php
$CONFIG = array (
  'instanceid' => 'REDACTED',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' =>
  array (
    0 => '192.168.2.101',
    1 => 'REDACTED',
  ),
  'datadirectory' => '/mnt/data/nextcloud/data/',
  'dbtype' => 'pgsql',
  'version' => '23.0.3.2',
  'overwrite.cli.url' => 'https://192.168.2.101/nextcloud',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => '127.0.0.1',
  'dbport' => '5432',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'default_language' => 'it',
  'force_language' => 'it',
  'default_locale' => 'it_IT',
  'force_locale' => 'it_IT',
  'defaultapp' => 'files',
  'default_phone_region' => 'IT',
  'maintenance' => false,
  'theme' => '',
  'log_type' => "file",
  'logfile' => "nextcloud.log",
  'loglevel' => 2,
);