I am taking my first steps with ActivityPub.
For this I have created static files.
https://dimna.de/.well-known/webfinger/index.php
<?php
$data = '{"subject":"acct:astrid@dimna.de","aliases":["https://dimna.de/user/astrid"],"links":[{"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://dimna.de"},{"rel":"self","type":"application/activity+json","href":"https://dimna.de/user/astrid"}]}';
header('Content-Type: application/json; charset=utf-8');
echo $data;
https://dimna.de/user/astrid/index.php
<?php
$data = '{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"id":"https://dimna.de/user/astrid","type":"Person","preferredUsername":"astrid","name":"dimna.de Blog","manuallyApprovesFollowers":false,"discoverable":true,"inbox":"https://dimna.de/user/astrid/inbox","outbox":"https://dimna.de/user/astrid/outbox","following":"https://dimna.de/user/astrid/following","followers":"https://dimna.de/user/astrid/followers","publicKey":{"id":"https://dimna.de/user/astrid#main","owner":"https://dimna.de/user/astrid","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvnJTfuyEgHxTs0UMR0Ee\n2rafvlfQDM+2RTRCAGnZ+ryBrLFBrk7oyIYDKe5ZKkJ2am8N2Y4Z958YppWOaWv+\nSzkqn/0Hkcc6DhPr9dfFsl3bjXy1wF5LU56RQXcYLXd58xtjKaak9HBaBP/sYuS6\nbpM/UaiiQeAxRzciXhzM7Ki2/mRV9ND2pGKFY02KPdljy1C16RDyetX5MVBbdgGi\n6KPs+U34t+h6zqEO7Hx03LBx/k0ZDWj8fKH/N/ZpMuAvAEwqkpMJXEK7/uA0F/zE\nSO/jivgOWQVX5sJnJWzfVS2RsFFwMI4uYh060SJRjX0o6kwupp3xlMe2UXhaqpML\nsQIDAQAB\n-----END PUBLIC KEY-----\n"},"summary":"astrids Blog","url":"https://dimna.de","publishedDate":"2017-04-05T00:00:00Z","icon":{"type":"Image","mediaType":"image/png","url":"https://dimna.de/activity-pub-icon.png"}}';
header('Content-Type: application/json; charset=utf-8');
echo $data;
In Curl everything looks good.
$ curl -X POST https://dimna.de/.well-known/webfinger/
{"subject":"acct:astrid@dimna.de","aliases":["https://dimna.de/user/astrid"],"links":[{"rel":"http://webfinger.net/rel/profile-page","type":"text/html","href":"https://dimna.de"},{"rel":"self","type":"application/activity+json","href":"https://dimna.de/user/astrid"}]}
and
$ curl -X POST https://dimna.de/user/astrid/
{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"id":"https://dimna.de/user/astrid","type":"Person","preferredUsername":"astrid","name":"dimna.de Blog","manuallyApprovesFollowers":false,"discoverable":true,"inbox":"https://dimna.de/user/astrid/inbox","outbox":"https://dimna.de/user/astrid/outbox","following":"https://dimna.de/user/astrid/following","followers":"https://dimna.de/user/astrid/followers","publicKey":{"id":"https://dimna.de/user/astrid#main","owner":"https://dimna.de/user/astrid","publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvnJTfuyEgHxTs0UMR0Ee\n2rafvlfQDM+2RTRCAGnZ+ryBrLFBrk7oyIYDKe5ZKkJ2am8N2Y4Z958YppWOaWv+\nSzkqn/0Hkcc6DhPr9dfFsl3bjXy1wF5LU56RQXcYLXd58xtjKaak9HBaBP/sYuS6\nbpM/UaiiQeAxRzciXhzM7Ki2/mRV9ND2pGKFY02KPdljy1C16RDyetX5MVBbdgGi\n6KPs+U34t+h6zqEO7Hx03LBx/k0ZDWj8fKH/N/ZpMuAvAEwqkpMJXEK7/uA0F/zE\nSO/jivgOWQVX5sJnJWzfVS2RsFFwMI4uYh060SJRjX0o6kwupp3xlMe2UXhaqpML\nsQIDAQAB\n-----END PUBLIC KEY-----\n"},"summary":"astrids Blog","url":"https://dimna.de","publishedDate":"2017-04-05T00:00:00Z","icon":{"type":"Image","mediaType":"image/png","url":"https://dimna.de/activity-pub-icon.png"}}
In Mastodon the profile is shown to me when I enter my handel @astrid@dimna.de
However, the profil http://dimna.de/user/astrid/
is not found.
If I understand it correctly so far, the latter is the better test and I should make sure of that before I go any further. What am I missing?