Nextcloud は、信頼されていないドメイン名を介してソリューションにアクセスしています Nextcloud 信頼されていないドメイン名からサーバーにアクセスしています

Windows コンピューターで、Web ページに「http://192.168.xxx.xxx:8080/login」と入力してリモートの ubuntu18.04 サーバーにアクセスし、Docker ミラーリングされた Nextcloud にアクセスし、「Nextcloud は信頼されていないドメインを介してアクセスします」とプロンプトを表示します。 name ソリューション Nextcloud you Access the server "" from an untrusted domain name
ここに画像の説明を挿入
, as a untrusted domain name, from a untrusted domain name, as shown in the following figure:これは、サーバーが暗号化されていない環境から暗号化された環境に変更されたときに表示され、サーバーの IP アドレスもかわった。

1. config.php ファイルを変更する

コンテナ名取得に1.1ps

~$ sudo docker ps
CONTAINER ID   IMAGE       COMMAND                  CREATED        STATUS        PORTS                                   NAMES
1375effa57b5   nextcloud   "/entrypoint.sh apac…"   5 months ago   Up 25 hours   0.0.0.0:8080->80/tcp, :::8080->80/tcp   hardcore_yonath

コンテナー名を hardcore_yonath として取得します。

1.2 config.php の修正

(1) コンテナーから config.php をコピー: docker イメージには編集ツールがないため、それをコピーします
sudo docker cp hardcore_yonath:/var/www/html/config/config.php /home/test/
(2) config .php を変更する

$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'ocebji0xjp9y',
  'passwordsalt' => 'iPTcDJ9yE7SKJAcfVAOpDoSuLQ2l4x',
  'secret' => '7rpWoUUBIZjAieRTNGwnCBa8QRtjEHlfRBXKPrHkxHWzIShm',
  'trusted_domains' => 
  array (
    0 => '192.168.aaa.bbb:8080',#这里的aaa和bbb我用了替代符,改为新的IP地址即可
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'sqlite3',
  'version' => '24.0.4.1',
  'overwrite.cli.url' => 'http://192.168.5.71:8080',
  'installed' => true,
);

(3) sudo systemctl stop docker.service docker サービスを停止します
(4) 変更した config.php を元の場所にコピーします
sudo docker cp /home/sunyc/config.php hardcore_yonath:/var/www/html/config/
( 5 ) config.php パーミッションの変更
config.php をコピーした後、パーミッションが変更されました. chmod 777 config.php を使用してパーミッションを変更するためにここにいます. パーミッションが変更されていない場合は、次の画面が表示されます: (6)
ここに画像の説明を挿入
sudo systemctl start docker.service docker サービスを再起動します
(7) sudo docker start hardcore_yonath docker コンテナを起動します hardcore_yonath

おすすめ

転載: blog.csdn.net/LoongEmbedded/article/details/128975538