w3id.org - DigitalCommons/open-data-and-maps GitHub Wiki
w3id.org
Similar to Purl.org, w3id.org provided permanent identifiers for the web. We can use identifiers like this:
https://w3id.org/coops-uk/2017/R001234
and configure w3id.org to redirect this URI to a web server under our control. This is done by modifying the w3id.org git repo. We have a copy of w3id.org.
Tracking upstream changes
Follow the GitHub documentation:
We needed to do this once:
$ git remote add upstream https://github.com/perma-id/w3id.org
and this each time we want to pull in changes from upstream:
$ git checkout master
$ git fetch upstream
$ git merge upstream/master
Testing our changes to w3id.org
The first step is to fork the w3id.org repository, and serve a clone of our fork on an Apache web server under our control. This test environment has been set up at https://w3id.solidarityeconomy.coop, currently running on our scaleway server. See details of Apache Config, below.
Making a change
Always work on a branch when making a change to w3id.org. These commands are issued in the directory where we have a clone of our fork (e.g. on our Scaleway server)
$ git checkout -b my-branch
Now make changes. Test them. Commit them.
To create a pull request, we need to push the changes made under my-branch
to GitHub:
$ git push --set-upstream origin my-branch
We can now create the pull request on GitHub - to the w3.id master, from our fork, my-branch
repo.
Once the Pull Request has been merged onto master, we can delete my-branch
, and get the lastest version of master:
$ git branch -d my-branch
$ git checkout master
$ git fetch upstream
$ git merge upstream/master
Apache Config
A virtual host has been set up in Apache for this subdomain, with the following site enabled:
matt@ise-0:/etc/apache2/sites-enabled$ ls w3id.solidarityeconomy.coop*
w3id.solidarityeconomy.coop.conf -> ../sites-available/w3id.solidarityeconomy.coop.conf
w3id.solidarityeconomy.coop-le-ssl.conf -> ../sites-available/w3id.solidarityeconomy.coop-le-ssl.conf
le-ssl
refers to the SSL-enabled site on port 443 with a LetsEncrypt certificate.
These config files are the best place to look for the details of what has been set up.
The following notes were made during the process of setting up this test site for w3id.org
:
mod-rewrite
enabled:
Apache must have # See what's enabled:
$ ls /etc/apache2/mods-enabled/
# Enable mod-rewrite if necessary:
$ sudo a2enmod rewrite
$ sudo service apache2 restart
Apache must allow override of main config
... by .htaccess
files, because that is how w3id.org
is configured.
See Apache docs on AllowOverride.
SSL must be enabled
We have a LetsEncrypt certificate. Its status can be reviewed here: https://www.ssllabs.com/ssltest/analyze.html?d=w3id.solidarityeconomy.coop&latest
w3id.org uses https. Details to follow... how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04.