Skip to content

Commit 172d957

Browse files
author
root
committed
update install instructions
1 parent 15bbd09 commit 172d957

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

INSTALL.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Installing this app to your Nextcloud
22

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+
322
## If your Nextcloud was installed using Snap
423

524
Steps you probably already took:
@@ -75,8 +94,15 @@ root@ubuntu-s-4vcpu-8gb-amd-ams3-01:~# 
7594
sudo cp -r /snap/nextcloud/current/htdocs /var/snap/nextcloud/current/nextcloud/config/
7695
cd /var/snap/nextcloud/current/nextcloud/config/htdocs
7796
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
80106
sudo snap restart nextcloud.apache
81107
```
82108

0 commit comments

Comments
 (0)