Get the most out of your Centmin Mod LEMP stack
Become a Member

Updating NextCloud

Discussion in 'Other Web Apps usage' started by iaTa, Apr 14, 2019.

  1. iaTa

    iaTa Member

    32
    6
    8
    Mar 26, 2018
    Ratings:
    +6
    Local Time:
    8:07 PM
    I have NextCloud up and running on CM.

    When NextCloud release an update and I update the server I see a load of JS errors which break the site until I recompile NGINX:
    Code:
    Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-f8vbju5oPOexH4fvdsvqcc2XedZJbp/YMC7gBZoyy/Qwbw='), or a nonce ('nonce-...') is required to enable inline execution.
    Why would recompiling NGINX fix these errors - does it clear a javascript cache?
     
  2. eva2000

    eva2000 Administrator Staff Member

    40,620
    9,015
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,881
    Local Time:
    5:07 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Recompiling nginx woudn't have anything to do with it. Tried just restarting nginx and php-fpm services after updating Nextcloud ? Recompile nginx also has a nginx service restart which maybe it.
    Code (Text):
    nprestart

    Are you behind Cloudflare ? Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'nonce- · Issue #4754 · nextcloud/server

    Or using ngx_pagespeed Nextcloud 12 doesn't work with chrome · Issue #5345 · nextcloud/server ? may need to use nginx pagespeed disable filters for some of your nextcloud static files / js etc

    You'd have to troubleshoot and tweak it yourself following these guides and info outlined below
     
    • Like Like x 1
  3. iaTa

    iaTa Member

    32
    6
    8
    Mar 26, 2018
    Ratings:
    +6
    Local Time:
    8:07 PM
    Nope not behind CloudFlare and tried restarting nginx after an upgrade.

    Pagespeed is enabled on the server but it has not been enabled on the NextCloud site.

    Only thing that fixes it is to recompile nginx. Tested this multiple times. So weird.
     
    Last edited: Apr 14, 2019
    style="display:inline-block;min-width:400px;max-width:970px;width:95%;height:90px" data-ad-client="ca-pub-6669518204467592" data-ad-slot="4024536743" data-ad-format="auto">
  4. eva2000

    eva2000 Administrator Staff Member

    40,620
    9,015
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,881
    Local Time:
    5:07 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    I'd still follow troubleshooting steps outline above for pagespeed as enabling pagespeed history/message log can reveal what if anything pagespeed is doing server wide.
     
    • Like Like x 1
  5. iaTa

    iaTa Member

    32
    6
    8
    Mar 26, 2018
    Ratings:
    +6
    Local Time:
    8:07 PM
    Checked the html and pagespeed was being used even though the pagespeed.conf files were commented out in the main config. Added 'pagespeed off' and all is sorted.

    Thanks for the pointer!
     
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    40,620
    9,015
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,881
    Local Time:
    5:07 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yup commenting out in vhost isn't enough if other vhosts have pagespeed include files enabled. Latest pagespeed uses pagespeed unplugged instead of pagespeed off to disable it though pagespeed off i think is deprecating eventually.
     
    • Like Like x 1