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

Run ownCloud on https #2

Closed
michielbdejong opened this issue Dec 17, 2020 · 10 comments
Closed

Run ownCloud on https #2

michielbdejong opened this issue Dec 17, 2020 · 10 comments

Comments

@michielbdejong
Copy link
Collaborator

and then get discovery-test working in testnet on https://server

@michielbdejong
Copy link
Collaborator Author

@michielbdejong
Copy link
Collaborator Author

I'll run it on http://server.com:8080 for now

@michielbdejong
Copy link
Collaborator Author

michielbdejong commented Dec 24, 2020

This is still not perfect, since when I log in to https://oc1.pdsinterop.net it redirects me to
http://oc1.pdsinterop.net/apps/files (with http instead of https).
Trying https://doc.owncloud.com/server/admin_manual/installation/changing_the_web_route.html
using:

docker exec -it owncloud-compose_owncloud_1 /bin/bash
# vim config/config.php

but docker-compose down fails so trying with a full host server reboot.

@michielbdejong
Copy link
Collaborator Author

As found in https://stackoverflow.com/a/56134376/680454 aa-remove-unknown helps to docker-compose down.

@michielbdejong
Copy link
Collaborator Author

curl -v https://oc1.pdsinterop.net
still redirects to http://oc1.pdsinterop.net/login

@michielbdejong
Copy link
Collaborator Author

@michielbdejong
Copy link
Collaborator Author

curl 'https://oc1.pdsinterop.net/login?user=admin' \
  -H 'Connection: keep-alive' \
  -H 'Cache-Control: max-age=0' \
  -H 'sec-ch-ua: "Google Chrome";v="87", "\"Not;A\\Brand";v="99", "Chromium";v="87"' \
  -H 'sec-ch-ua-mobile: ?1' \
  -H 'Upgrade-Insecure-Requests: 1' \
  -H 'Origin: null' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36' \
  -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Sec-Fetch-Mode: navigate' \
  -H 'Sec-Fetch-User: ?1' \
  -H 'Sec-Fetch-Dest: document' \
  -H 'Accept-Language: nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6,fr;q=0.5,de-DE;q=0.4,de;q=0.3,es-ES;q=0.2,es;q=0.1,id-ID;q=0.1,id;q=0.1' \
  -H 'Cookie: oc_sessionPassphrase=jW20j8%2BsBCl5tInGq5yrYjrM%2B78Y8emgnUkJd%2FsR5sSaKKzu7gOv1vFJscnNB3YNLVT5friF7jr9m9QHTUW4d40EUhuOkBtb1hu%2FqxLN9OUlXr6zG2RXHt7AyMza8yyZ; octpoorjpn4r=biq2b1ou52h1gflmd3ute3te8s' \
  --data-raw 'user=admin&password=admin&timezone-offset=1&timezone=Europe%2FBerlin&requesttoken=FCEzEjgwFmYlEQdlbV0SOF0EH3Z1LH4QCx0OezQcGxQ%3D%3APQwswffQWWl79hQw8o%2F7EAIROZoLFvZQWSL%2FV%2F28ylo%3D' \
  --compressed -v
[...]
< HTTP/1.1 303 See Other
[...]
< location: http://oc1.pdsinterop.net/apps/files/

@michielbdejong
Copy link
Collaborator Author

I tried 'overwritewebroot' from owncloud/core#11656 (comment) but that leads to:

< location: http://oc1.pdsinterop.net/https://oc1.pdsinterop.net//apps/files/

@michielbdejong
Copy link
Collaborator Author

But then in https://doc.owncloud.org/server/8.1/admin_manual/configuration_server/reverse_proxy_configuration.html#parameters I found that adding 'overwriteprotocol' => 'https', to config/config.php does the trick! :)

@michielbdejong
Copy link
Collaborator Author

Added a comment to the ownCloud forum https://central.owncloud.org/t/forcing-https-on-owncloud/4289/12?u=michielbdejong and linked to that from a few other related threads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant