Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud update from 15.04 to 05 leaves me with ocm ocs provider errors #2638

Closed
minnux opened this issue Mar 15, 2019 · 7 comments
Closed
Labels
Enhancement 💨 Solution available 🥂 Definite solution has been done
Milestone

Comments

@minnux
Copy link

minnux commented Mar 15, 2019

Creating a bug report/issue

Required Information

  • DietPi version | 6.21.1
  • Distro version | stretch
  • Kernel version | Linux DietPi 4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1 Fix warning when running scp over openssh-server #1 SMP Mon Oct 22 20:59:41 UTC 2018 aarch64 GNU/Linux
  • SBC device | RockPro64 (aarch64)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SDcard used | none

Additional Information (if applicable)

  • Software title | Nextcloud 15.05
  • updated
  • Can this issue be replicated on a fresh installation of DietPi? | not sure
  • dietpi-bugreport ID | sed -n 5p /DietPi/dietpi/.hw_model

Steps to reproduce

Upgrade from Nextcloud 15.04 to 15.05

Expected behaviour

no error messages

  • ...

Actual behaviour

Nextcloud -> Settings -> Overview under "Security & setup warnings"

"Your web server is not properly set up to resolve "/ocm-provider/". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it's documentation page. On Nginx those are typically the lines starting with "location ~" that need an update."

"Your web server is not properly set up to resolve "/ocs-provider/". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it's documentation page. On Nginx those are typically the lines starting with "location ~" that need an update."

Extra details

I realize this is a Nextcloud upgrade issue and not a dietpi issue but the solutions I have found are for Apache/Nginx and/or on remote servers. See here: https://help.nextcloud.com/t/your-web-server-is-not-properly-set-up-to-resolve-ocm-provider/48530

I'm running the default dietpi Nextcloud installation that includes lighttpd webserver on a local server and I can't figure out how I would resolve this error message using my particular configuration and the solutions I've found on the Nextcloud forum. Any help as to what to change would be appreciated. Thank you.
Screen Shot 2019-03-15 at 4 10 31 PM

@MichaIng MichaIng added this to the v6.22 milestone Mar 15, 2019
@MichaIng
Copy link
Owner

MichaIng commented Mar 15, 2019

@minnux
Many thanks for your report.

Yes I already recognized the same.

On my Apache server I solved it by adding:

Redirect permanent /ocm-provider /nextcloud/ocm-provider
Redirect permanent /ocs-provider /nextcloud/ocs-provider

On Lighttpd run:

echo '# Redirect OCM/OCS requests to Nextcloud endpoint:
url.redirect = (
	"^/ocm-provider"  => "/nextcloud/ocm-provider",
	"^/ocs-provider" => "/nextcloud/ocs-provider"
)' >> /etc/lighttpd/conf-available/99-dietpi-nextcloud.conf

I will add this to our configs for v6.22.

@MichaIng
Copy link
Owner

PR up and ready to test, however solution is quite clear: #2639

@minnux
Copy link
Author

minnux commented Mar 15, 2019

That didn't resolve it. Should the last part be nextcloud.conf and not owncloud.conf?

@MichaIng
Copy link
Owner

@minnux
Whoopsie jep of course, copy&paste from wrong install 😅. Remove the owncloud.conf again 😉.

@minnux
Copy link
Author

minnux commented Mar 15, 2019

Nextcloud web interface fails to load now. Here is my current 99-dietpi-nextcloud.conf

$HTTP["url"] =~ "^/nextcloud($|/)" {
  setenv.add-environment += (
    "PHP_ADMIN_VALUE" => "opcache.memory_consumption=128",
  )
}

# Set "Referrer-Policy" = "no-referrer" security header
setenv.add-response-header = ( "Referrer-Policy" => "no-referrer" )
# Redirect OCM/OCS requests to Nextcloud endpoint:
url.redirect = (
"^/ocm-provider"  => "/nextcloud/ocm-provider",
"^/ocs-provider" => "/nextcloud/ocs-provider"
)

@MichaIng
Copy link
Owner

MichaIng commented Mar 15, 2019

@minnux
Jep also ran into this issue. url.redirect = ( fails if it is two times inside the configs.

Please change it to url.redirect += (, at best as well in the second occurrence: /etc/lighttpd/conf-enabled/99-dietpi-dav_redirect.conf

@minnux
Copy link
Author

minnux commented Mar 15, 2019

It worked! Thanks for the feedback. No more error messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement 💨 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

2 participants