Avatar
🏃
28 results for Nextcloud
  • J’avais l’erreur suivante :

    La base de données a quelques index manquants. L’ajout d’index dans de grandes tables peut prendre un certain temps. Elles ne sont donc pas ajoutées automatiquement. En exécutant “occ db:add-missing-indices”, ces index manquants pourront être ajoutés manuellement pendant que l’instance continue de tourner. Une fois les index ajoutés, les requêtes sur ces tables sont généralement beaucoup plus rapides.

    -Index “fs_id_storage_size” manquant dans la table “oc_filecache”. -Index “fs_storage_path_prefix” manquant dans la table “oc_filecache”. -Index “properties_pathonly_index” manquant dans la table “oc_properties”. -Index “job_lastcheck_reserved” manquant dans la table “oc_jobs”.

    nextcloud Created Wed, 11 May 2022 00:00:00 +0000
  • J’ai pas compris pourquoi cela ne fonctionnait pas, donc pour l’instant je fais manuellement …

    # du -sh /usr/share/nginx/nextcloud/data/nextcloud.log 
    3,5G	/usr/share/nginx/nextcloud/data/nextcloud.log
    # du -sh /var/log/nextcloud.log
    6,4G	/var/log/nextcloud.log
    # sudo -u www-data truncate /usr/share/nginx/nextcloud/data/nextcloud.log --size 0
    # sudo -u www-data truncate /var/log/nextcloud.log --size 0
    # sudo systemctl restart php8.0-fpm 
    # sudo systemctl restart ngnix

    A suivre pour une vrai résolution.

    nextcloud Created Tue, 13 Jul 2021 00:00:00 +0000
  • J’ai du eu l’erreur suivante sur NextCloud (sous Ubuntu):

    # sudo -u www-data php8.0 -f /usr/share/nginx/nextcloud/occ maintenance:repair
    An unhandled exception has been thrown:
    OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

    Pour fixer l’erreur j’ai du faire :

    # sudo ln -s /etc/php/8.0/mods-available/apcu.ini /etc/php/8.0/fpm/conf.d/30-apcu.ini
    # sudo echo 'apc.enable_cli=1' >> /etc/php/8.0/mods-available/apcu.ini
    # sudo systemctl restart php8.0-fpm

    Maintenant c’est fixé.

    nextcloud Created Sun, 11 Jul 2021 00:00:00 +0000
  • Suite à l’update de NextCloud j’ai eu un crash :

    Type : Error
    Code : 0
    Message : Undefined class constant 'MAJOR_VERSION'
    Fichier : /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/Utils.php
    Ligne : 118
    
    Trace
    
    #0 /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
    #1 /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
    #2 /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults(Array)
    #3 /usr/share/nginx/nextcloud/lib/private/Http/Client/ClientService.php(62): GuzzleHttp\Client->__construct()
    #4 /usr/share/nginx/nextcloud/lib/private/OCS/DiscoveryService.php(55): OC\Http\Client\ClientService->newClient()
    #5 /usr/share/nginx/nextcloud/lib/private/Server.php(1264): OC\OCS\DiscoveryService->__construct(Object(OC\Memcache\Factory), Object(OC\Http\Client\ClientService))
    #6 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
    #7 /usr/share/nginx/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
    #8 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\OCS\\IDiscov...')
    #9 /usr/share/nginx/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OCP\\OCS\\IDiscov...', false)
    #10 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(434): OC\ServerContainer->query('OCP\\OCS\\IDiscov...', true)
    #11 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCP\\OCS\\IDiscov...', true)
    #12 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
    #13 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
    #14 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
    #15 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\FederatedFi...')
    #16 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\FederatedFi...')
    #17 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(431): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\FederatedFi...')
    #18 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\FederatedFi...', true)
    #19 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
    #20 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
    #21 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
    #22 /usr/share/nginx/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\FederatedFi...')
    #23 /usr/share/nginx/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\FederatedFi...')
    #24 /usr/share/nginx/nextcloud/lib/private/ServerContainer.php(146): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\FederatedFi...')
    #25 /usr/share/nginx/nextcloud/apps/provisioning_api/lib/Capabilities.php(50): OC\ServerContainer->query('OCA\\FederatedFi...')
    #26 /usr/share/nginx/nextcloud/lib/private/CapabilitiesManager.php(72): OCA\Provisioning_API\Capabilities->getCapabilities()
    #27 /usr/share/nginx/nextcloud/lib/private/Template/JSConfigHelper.php(183): OC\CapabilitiesManager->getCapabilities()
    #28 /usr/share/nginx/nextcloud/lib/private/TemplateLayout.php(211): OC\Template\JSConfigHelper->getConfig()
    #29 /usr/share/nginx/nextcloud/lib/private/legacy/OC_Template.php(183): OC\TemplateLayout->__construct('user', 'dashboard')
    #30 /usr/share/nginx/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php(210): OC_Template->fetchPage(Array)
    #31 /usr/share/nginx/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(172): OCP\AppFramework\Http\TemplateResponse->render()
    #32 /usr/share/nginx/nextcloud/lib/private/AppFramework/App.php(157): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Dashboard\Controller\DashboardController), 'index')
    #33 /usr/share/nginx/nextcloud/lib/private/Route/Router.php(302): OC\AppFramework\App::main('OCA\\Dashboard\\C...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
    #34 /usr/share/nginx/nextcloud/lib/base.php(993): OC\Route\Router->match('/apps/dashboard...')
    #35 /usr/share/nginx/nextcloud/index.php(37): OC::handleRequest()
    #36 {main}

    Pour fixer le problème j’ai supprimé le plugins : files_external_gdrive Le plugins utilisait une ancienne version : /usr/share/nginx/nextcloud/apps/files_external_gdrive/vendor/guzzlehttp/guzzle/src/ClientInterface.php alors qu’il fallait utiliser la nouvelle version : /usr/share/nginx/nextcloud/3rdparty/guzzlehttp/guzzle/src/ClientInterface.php

    nextcloud Created Wed, 07 Jul 2021 00:00:00 +0000
  • Avant la mise à jours j’ai du lancer une commande :

    #  sudo -u www-data php7.3 /usr/share/nginx/nextcloud/occ db:convert-filecache-bigint
    [sudo] password for XXXXX:
    Following columns will be updated:
    
    * federated_reshares.share_id
    * filecache_extended.fileid
    * files_trash.auto_id
    * share_external.id
    * share_external.parent
    
    This can take up to hours, depending on the number of files in your instance!
    Continue with the conversion (y/n)? [n] An unhandled exception has been thrown:
    Error: Call to undefined method Symfony\Component\Console\Question\ConfirmationQuestion::getAutocompleterCallback() in /usr/share/nginx/nextcloud/3rdparty/symfony/console/Helper/QuestionHelper.php:108
    Stack trace:
    #0 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Helper/QuestionHelper.php(61): Symfony\Component\Console\Helper\QuestionHelper->doAsk(Object(Symfony\Component\Console\Output\StreamOutput), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
    #1 /usr/share/nginx/nextcloud/core/Command/Db/ConvertFilecacheBigInt.php(121): Symfony\Component\Console\Helper\QuestionHelper->ask(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\StreamOutput), Object(Symfony\Component\Console\Question\ConfirmationQuestion))
    #2 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Db\ConvertFilecacheBigInt->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #3 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #4 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Db\ConvertFilecacheBigInt), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #5 /usr/share/nginx/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #6 /usr/share/nginx/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #7 /usr/share/nginx/nextcloud/console.php(100): OC\Console\Application->run()
    #8 /usr/share/nginx/nextcloud/occ(11): require_once('/usr/share/ngin...')
    #9 {main}

    Mais cela plantait à chaque fois … j’ai donc vu qu’il fallait mettre :

    nextcloud Created Sat, 22 May 2021 00:00:00 +0000
  • En faisant l’inspection de mon disque pour NextCloud j’ai pu voir que l’espace disque utilisé était énorme :

    /usr/share/nginx/nextcloud# du -sh data/
    322G data/

    J’ai donc lancé une suppression manuelle des anciennes version de fichier :

    /usr/share/nginx/nextcloud# sudo -u www-data php7.3 /usr/share/nginx/nextcloud/occ versions:cleanup
    Delete all versions
    Delete versions for users on backend Database
    ...

    A la fin du process :

    /usr/share/nginx/nextcloud# du -sh data/
    91G	data/

    Donc suppression de 231 Go .

    nextcloud Created Tue, 09 Mar 2021 00:00:00 +0000
  • Voici la commandes que j’utilises pour forcer le scan des photos :

    sudo -u www-data php7.3 /usr/share/nginx/nextcloud/occ maps:scan-photos

    Le lien vers l’application :

    https://github.com/nextcloud/maps

    maps nextcloud Created Sat, 06 Feb 2021 00:00:00 +0000
  • Sur NEXTCLOUD j’ai l’erreur : SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock;

    Mes versions :

    • NEXTCLOUD : 20.0.1 ( command : sudo -u www-data php /var/www/html/nextcloud/occ –version )
    • MARIADB : 10.3.25-MariaDB-0+deb10u1 Debian 10
    • PHP : 7.3.19-1~deb10u1
    • OS : Debian 10

    Quand j’essaye de voir ou est le problème :

    MariaDB [(none)]> SHOW ENGINE INNODB STATUS;
    ...
    | InnoDB |      | 
    =====================================
    2020-11-17 09:19:30 0x7fa224b77700 INNODB MONITOR OUTPUT
    =====================================
    Per second averages calculated from the last 15 seconds
    -----------------
    BACKGROUND THREAD
    -----------------
    srv_master_thread loops: 461 srv_active, 0 srv_shutdown, 600286 srv_idle
    srv_master_thread log flush and writes: 600676
    ----------
    SEMAPHORES
    ----------
    OS WAIT ARRAY INFO: reservation count 98430
    OS WAIT ARRAY INFO: signal count 85332
    RW-shared spins 64094, rounds 1791314, OS waits 59076
    RW-excl spins 22498, rounds 84684, OS waits 850
    RW-sx spins 1924, rounds 35426, OS waits 904
    Spin rounds per wait: 27.95 RW-shared, 3.76 RW-excl, 18.41 RW-sx
    ------------------------
    LATEST DETECTED DEADLOCK
    ------------------------
    2020-11-14 16:45:09 0x7fa23828d700
    *** (1) TRANSACTION:
    TRANSACTION 506754, ACTIVE 0 sec starting index read
    mysql tables in use 1, locked 1
    LOCK WAIT 7 lock struct(s), heap size 1128, 7 row lock(s), undo log entries 3
    MySQL thread id 33716, OS thread handle 140334704551680, query id 602553 localhost farias Updating
    UPDATE `oc_file_locks` SET `lock` = `lock` - '1' WHERE (`key` IN ('files/f3c7b68359c596992199b90449d7ff8c', 'files/5a2eaa89d932ecbb1dfec1006109244b', 'files/b34c1fc8665aefe70b8e44d4ac09aa67', 'files/994269d0fc31eeda97e0469ed6ab8da3', 'files/d6a2d20758f30740cbecca7cc8b13233', 'files/8853c6e699dd4e7e2655f41918e5a1d2', 'files/3320d1d40cdf4b94707b61cda6ecae0b', 'files/2af4fbefe05ca8c38046394574650bed', 'files/c5f55069bcd203aaa95e4290aabd8c8b', 'files/5aa7bb013dd77e1cdc270e19760a6a23', 'files/d4be38ed80c9b1bf63e3bf45937fb8cd', 'files/ecaafc552486d9c983da23ce46dd72eb', 'files/bbeee26a3ecfeb7ea06dc35abfdff76b', 'files/69f5b0b8e324f92f590b6211eb6c96a1', 'files/5f57699c6ab4f6f04e2c1649ded34919', 'files/c122984832ebf9f0484fd06b33caf6ca', 'files/7c240806d390dc989d67aeb310ce09ac', 'files/d183dc061d795de42af22fbdac8d9ace', 'files/64149897c3515f6526f20690d6cdaa86', 'files/2cd2b02ce9f36f5a067cf8d8e205f34e', 'files/bac5d6b465c
    *** (1) WAITING FOR THIS LOCK TO BE GRANTED:
    RECORD LOCKS space id 39 page no 53 n bits 232 index lock_key_index of table `nextclouddb`.`oc_file_locks` trx id 506754 lock_mode X locks rec but not gap waiting
    Record lock, heap no 25 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
     0: len 30; hex 66696c65732f356132656161383964393332656362623164666563313030; asc files/5a2eaa89d932ecbb1dfec100; (total 38 bytes);
     1: len 8; hex 0000000000004b43; asc       KC;;
    
    *** (2) TRANSACTION:
    TRANSACTION 506747, ACTIVE 0 sec inserting
    mysql tables in use 1, locked 1
    16 lock struct(s), heap size 1128, 16 row lock(s), undo log entries 6
    MySQL thread id 33717, OS thread handle 140334703630080, query id 602561 localhost farias Update
    INSERT INTO `oc_file_locks` (`key`, `lock`, `ttl`) VALUES('files/3320d1d40cdf4b94707b61cda6ecae0b', '1', '1605372309')
    *** (2) HOLDS THE LOCK(S):
    RECORD LOCKS space id 39 page no 53 n bits 232 index lock_key_index of table `nextclouddb`.`oc_file_locks` trx id 506747 lock mode S
    Record lock, heap no 25 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
     0: len 30; hex 66696c65732f356132656161383964393332656362623164666563313030; asc files/5a2eaa89d932ecbb1dfec100; (total 38 bytes);
     1: len 8; hex 0000000000004b43; asc       KC;;
    
    *** (2) WAITING FOR THIS LOCK TO BE GRANTED:
    RECORD LOCKS space id 39 page no 39 n bits 352 index lock_key_index of table `nextclouddb`.`oc_file_locks` trx id 506747 lock mode S waiting
    Record lock, heap no 111 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
     0: len 30; hex 66696c65732f333332306431643430636466346239343730376236316364; asc files/3320d1d40cdf4b94707b61cd; (total 38 bytes);
     1: len 8; hex 0000000000004b4b; asc       KK;;
    
    *** WE ROLL BACK TRANSACTION (1)
    ------------
    TRANSACTIONS
    ------------
    Trx id counter 546878
    Purge done for trx's n:o < 546878 undo n:o < 0 state: running but idle
    History list length 0
    LIST OF TRANSACTIONS FOR EACH SESSION:
    ---TRANSACTION 421809682043144, not started
    0 lock struct(s), heap size 1128, 0 row lock(s)
    ---TRANSACTION 421809682038928, not started
    0 lock struct(s), heap size 1128, 0 row lock(s)
    --------
    FILE I/O
    --------
    I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
    I/O thread 1 state: waiting for completed aio requests (log thread)
    I/O thread 2 state: waiting for completed aio requests (read thread)
    I/O thread 3 state: waiting for completed aio requests (read thread)
    I/O thread 4 state: waiting for completed aio requests (read thread)
    I/O thread 5 state: waiting for completed aio requests (read thread)
    I/O thread 6 state: waiting for completed aio requests (write thread)
    I/O thread 7 state: waiting for completed aio requests (write thread)
    I/O thread 8 state: waiting for completed aio requests (write thread)
    I/O thread 9 state: waiting for completed aio requests (write thread)
    Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
     ibuf aio reads:, log i/o's:, sync i/o's:
    Pending flushes (fsync) log: 0; buffer pool: 0
    2613 OS file reads, 488009 OS file writes, 304247 OS fsyncs
    0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
    -------------------------------------
    INSERT BUFFER AND ADAPTIVE HASH INDEX
    -------------------------------------
    Ibuf: size 1, free list len 9, seg size 11, 41 merges
    merged operations:
     insert 43, delete mark 724, delete 8
    discarded operations:
     insert 0, delete mark 0, delete 0
    Hash table size 34679, node heap has 2 buffer(s)
    Hash table size 34679, node heap has 5 buffer(s)
    Hash table size 34679, node heap has 2 buffer(s)
    Hash table size 34679, node heap has 2 buffer(s)
    Hash table size 34679, node heap has 3 buffer(s)
    Hash table size 34679, node heap has 8 buffer(s)
    Hash table size 34679, node heap has 7 buffer(s)
    Hash table size 34679, node heap has 10 buffer(s)
    0.00 hash searches/s, 0.00 non-hash searches/s
    ---
    LOG
    ---
    Log sequence number 536481738
    Log flushed up to   536481738
    Pages flushed up to 536481738
    Last checkpoint at  536481729
    0 pending log flushes, 0 pending chkp writes
    211673 log i/o's done, 0.00 log i/o's/second
    ----------------------
    BUFFER POOL AND MEMORY
    ----------------------
    Total large memory allocated 170655744
    Dictionary memory allocated 615072
    Buffer pool size   8192
    Free buffers       4922
    Database pages     2746
    Old database pages 993
    Modified db pages  0
    Percent of dirty pages(LRU & free pages): 0.000
    Max dirty pages percent: 75.000
    Pending reads 0
    Pending writes: LRU 0, flush list 0, single page 0
    Pages made young 3994, not young 1406
    0.00 youngs/s, 0.00 non-youngs/s
    Pages read 2351, created 395, written 247428
    0.00 reads/s, 0.00 creates/s, 0.00 writes/s
    No buffer pool page gets since the last printout
    Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
    LRU len: 2746, unzip_LRU len: 1013
    I/O sum[42]:cur[0], unzip sum[0]:cur[0]
    --------------
    ROW OPERATIONS
    --------------
    0 queries inside InnoDB, 0 queries in queue
    0 read views open inside InnoDB
    Process ID=645, Main thread ID=140333945968384, state: sleeping
    Number of rows inserted 14499, updated 74567, deleted 5768, read 9673725
    0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
    Number of system rows inserted 0, updated 0, deleted 0, read 18326
    0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
    ----------------------------
    END OF INNODB MONITOR OUTPUT
    ============================

    Je n’arrive pas à trouver le problème.

    nextcloud Created Tue, 17 Nov 2020 00:00:00 +0000
  • Ma procédure :

    Etape 1 : Ajouter les bons packages :

    $ apt-get update && apt-get install certbot python-certbot-apache

    Etape 2 : Demande du certificat :

    $ certbot --apache -w /var/www/html/nextcloud/ -d my.cyber-neurones.org
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator apache, Installer apache
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for my.cyber-neurones.org
    Waiting for verification...
    Cleaning up challenges
    Created an SSL vhost at /etc/apache2/sites-available/nextcloud-le-ssl.conf
    Enabled Apache ssl module
    Deploying Certificate to VirtualHost /etc/apache2/sites-available/nextcloud-le-ssl.conf
    Enabling available site: /etc/apache2/sites-available/nextcloud-le-ssl.conf
    
    Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1: No redirect - Make no further changes to the webserver configuration.
    2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
    new sites, or if you're confident your site works on HTTPS. You can undo this
    change by editing your web server's configuration.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
    
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Congratulations! You have successfully enabled https://my.cyber-neurones.org
    
    You should test your configuration at:
    https://www.ssllabs.com/ssltest/analyze.html?d=my.cyber-neurones.org
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    
    IMPORTANT NOTES:
     - Congratulations! Your certificate and chain have been saved at:
       /etc/letsencrypt/live/my.cyber-neurones.org/fullchain.pem
       Your key file has been saved at:
       /etc/letsencrypt/live/my.cyber-neurones.org/privkey.pem
       Your cert will expire on 2021-01-31. To obtain a new or tweaked
       version of this certificate in the future, simply run certbot again
       with the "certonly" option. To non-interactively renew *all* of
       your certificates, run "certbot renew"
     - If you like Certbot, please consider supporting our work by:
    
       Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
       Donating to EFF:                    https://eff.org/donate-le

    Etape 3 : Restart de apache :

    nextcloud Created Mon, 02 Nov 2020 00:00:00 +0000
  • Je viens de voir qu’il y avait quelques problèmes sur mon installation :

    1- Manque d’un index :

    # sudo -u www-data php /usr/share/nginx/nextcloud/occ db:add-missing-indices
    Check indices of the share table.
    Check indices of the filecache table.
    Check indices of the twofactor_providers table.
    Check indices of the login_flow_v2 table.
    Check indices of the whats_new table.
    Check indices of the cards table.
    Check indices of the cards_properties table.
    Check indices of the calendarobjects_props table.
    Check indices of the schedulingobjects table.
    Check indices of the oc_properties table.
    Adding properties_path_index index to the oc_properties table, this can take some time...
    oc_properties table updated successfully.

    2- Manque d’une colonne :

    sudo -u www-data php /usr/share/nginx/nextcloud/occ db:add-missing-columns
    Check columns of the comments table.
    Adding additional reference_id column to the comments table, this can take some time...
    Comments table updated successfully.

    3- Passage de PHP 7.2 en PHP 7.3 :

    # sudo add-apt-repository ppa:ondrej/php
    ...
    # sudo apt-get update
    ...
    # sudo apt install php7.3
    ....
    Les paquets supplémentaires suivants seront installés : 
    libapache2-mod-php7.3 libpcre2-8-0 php-common php7.3-cli php7.3-common php7.3-json php7.3-opcache
    php7.3-readline
    Paquets suggérés :
    php-pear
    Les NOUVEAUX paquets suivants seront installés :
    libapache2-mod-php7.3 libpcre2-8-0 php7.3 php7.3-cli php7.3-common php7.3-json php7.3-opcache
    php7.3-readline
    ...
    # sudo apt install php7.3-common php7.3-cli php7.3-bcmath php7.3-bz2 php7.3-curl php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-readline php7.3-xml php7.3-zip php7.3-fpm
    ...
    NOTICE: Not enabling PHP 7.3 FPM by default.
    NOTICE: To enable PHP 7.3 FPM in Apache2 do:
    NOTICE: a2enmod proxy_fcgi setenvif
    NOTICE: a2enconf php7.3-fpm
    NOTICE: You are seeing this message because you have apache2 package installed.
    
    # sudo apt-get install php7.3-mysql php7.3-imagick php7.3-recode php7.3-tidy php7.3-xmlrpc
    
    # sudo a2dismod php7.2
    Module php7.2 disabled.
    To activate the new configuration, you need to run:
    systemctl restart apache2
    # sudo a2enmod php7.3
    Considering dependency mpm_prefork for php7.3:
    Considering conflict mpm_event for mpm_prefork:
    Considering conflict mpm_worker for mpm_prefork:
    Module mpm_prefork already enabled
    Considering conflict php5 for php7.3:
    Enabling module php7.3.
    To activate the new configuration, you need to run:
    systemctl restart apache2
    # sudo systemctl restart apache2
    # sudo a2enmod proxy_fcgi setenvif
    Considering dependency proxy for proxy_fcgi:
    Enabling module proxy.
    Enabling module proxy_fcgi.
    Module setenvif already enabled
    To activate the new configuration, you need to run:
    systemctl restart apache2
    $ sudo a2enconf php7.3-fpm
    Enabling conf php7.3-fpm.
    To activate the new configuration, you need to run:
    systemctl reload apache2
    $ php -v
    PHP 7.3.21-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:44:10) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.21, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.21-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

    4- Ajout du module PHP bcmath :

    # sudo apt install php7.3-bcmath

    5 - Ajout du module PHP gmp :

    # sudo apt install php7.3-gm

    6 - Check et start de php7.3-fpm :

    # ls -l /run/php/php7.*
    -rw-r--r-- 1 root     root     4 août  24 13:07 /run/php/php7.2-fpm.pid
    srw-rw---- 1 www-data www-data 0 août  24 13:07 /run/php/php7.2-fpm.sock
    -rw-r--r-- 1 root     root     5 août  31 11:26 /run/php/php7.3-fpm.pid
    srw-rw---- 1 www-data www-data 0 août  31 11:26 /run/php/php7.3-fpm.sock
    
    #  sudo systemctl start php7.3-fpm
    
    #  sudo systemctl enable php7.3-fpm
    
    # diff /etc/php/7.3/fpm/php.ini /etc/php/7.2/fpm/php.ini  | grep -v "< ;" | grep -v "> ;" | grep -v "\-\-\-"
    ...
    < output_buffering = 4096 > output_buffering = 8192
    ...
    < max_execution_time = 30 > max_execution_time = 600
    ...
    < max_input_time = 60 > max_input_time = 600
    ...
    < memory_limit = 128M > memory_limit = 2048M
    ...
    < display_errors = Off > display_errors = On
    ...
    < display_startup_errors = Off > display_startup_errors = On
    ...
    < log_errors_max_len = 1024 > log_errors_max_len = 4024
    ...
    < ignore_repeated_errors = Off > ignore_repeated_errors = On
    ...
    < post_max_size = 8M > post_max_size = 20M
    ...
    < upload_max_filesize = 2M > upload_max_filesize = 40M
    ...
    < max_file_uploads = 20 > max_file_uploads = 100
    ...
    < default_socket_timeout = 60 > default_socket_timeout = 600
    ...
    < session.cache_expire = 180 > session.cache_expire = 320

    7 - Modification dans NextCloud :

    Fichier /etc/nginx/conf.d/nextcloud-local.conf et /etc/nginx/conf.d/nextcloud.conf :

    nextcloud Created Mon, 31 Aug 2020 00:00:00 +0000