|
1 | 1 | # Installing this app to your Nextcloud |
2 | 2 |
|
| 3 | +## Set up /.well-known/openid-configuration |
| 4 | +After installing and enabling the app, take the JSON from e.g. |
| 5 | + |
| 6 | +`https://cloud.pondersource.org/index.php/apps/solid/openid` (depending on your hostname and whether you have the `index.php/` part in there) |
| 7 | + |
| 8 | +and put that into e.g. `/var/www/html/.well-known/openid-configuration` (depending on your webroot being e.g. `/var/www/html`) |
| 9 | +Check that it works: `https://cloud.pondersource.org/.well-known/openid-configuration` |
| 10 | +Then add this section to your apache site.conf: |
| 11 | +``` |
| 12 | +<Directory /var/www/html/.well-known/> |
| 13 | + Header always set Access-Control-Allow-Origin: * |
| 14 | +</Directory> |
| 15 | +``` |
| 16 | +Then restart Apache. |
| 17 | + |
| 18 | +In earlier versions of this app (e.g. the one in the Dockerfile we use for running the Solid test suite) we |
| 19 | +used a redirect from /.well-known/openid-configuration to /index.php/apps/solid/openid but it's difficult |
| 20 | +to add CORS headers to a redirect, so that's why just copying the file into a folder like that is preferable. |
| 21 | + |
3 | 22 | ## If your Nextcloud was installed using Snap |
4 | 23 |
|
5 | 24 | Steps you probably already took: |
@@ -75,8 +94,15 @@ root@ubuntu-s-4vcpu-8gb-amd-ams3-01:~# |
75 | 94 | sudo cp -r /snap/nextcloud/current/htdocs /var/snap/nextcloud/current/nextcloud/config/ |
76 | 95 | cd /var/snap/nextcloud/current/nextcloud/config/htdocs |
77 | 96 | sudo mount /var/snap/nextcloud/current/nextcloud/config/htdocs /snap/nextcloud/current/htdocs/ -o bind |
78 | | -cp .htaccess bak.htaccess |
79 | | -sed -i '95 i\ RewriteRule ^\\.well-known/openid-configuration /index.php/apps/solid/openid [R=302,L]' ./.htaccess |
| 97 | +``` |
| 98 | +Now make the change described in the "Set up /.well-known/openid-configuration" section above, but using |
| 99 | +`/var/snap/nextcloud/current/nextcloud/config/htdocs/.well-known/openid-configuration` as the directory. |
| 100 | +
|
| 101 | +FIXME: How can you edit the Apache site.conf if installed via Snap? Maybe see if the Header directive |
| 102 | +can live in `/var/snap/nextcloud/current/nextcloud/config/htdocs/.well-known/.htaccess` instead? |
| 103 | +
|
| 104 | +Restart Apache using: |
| 105 | +```sh |
80 | 106 | sudo snap restart nextcloud.apache |
81 | 107 | ``` |
82 | 108 |
|
|
0 commit comments