EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09962


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Eprints and .well-known


CAUTION: This e-mail originated outside the University of Southampton.

Thanks David and John, I'll work on it.

Il 11/02/25 18:07, David R Newman ha scritto:

Sorry that should have been:

Alias /.well-known EPRITHS_PATH/archives/ARCHIVE_ID/cfg/lang/en/static/.well-known
With EPRINTS_PATH and ARCHIVE_ID substituted as appropriate.

On 11/02/2025 17:05, David R Newman wrote:

Hi Yuri,

I think an alternative option could be to setup a rewrite exception [1], as these look to be applied before anything start with a "/." is rejected.   E.g.

$c->{rewrite_exceptions} = [ '/.well-known/' ];
Then you can write you own Apache config wherever your HTTPS virtualhost is to allow it to serve your .well-known/afile.
Alias /.well-known /opt/eprints3/archives/cfg/lang/en/static/.well-known
You may also need to add this to your archive's cfg/apachevhost.conf or create one and run:

EPRINTS_PATH/bin/generate_apacheconf --system --replace

If you need to also be able to serve this file under HTTPS.

This is a bit like the configuration used support Shibboleth authentication [2].

Regards

David Newman


On 11/02/2025 16:47, John Salter wrote:
CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hi Yuri,
Yes - by default (as mentioned in those Additional Notes), EPrints will reject requests containing "/.".

If it's a static file that you need to serve, you should just be able to replace the 'acme-challenge' part in that trigger with the URL to your file.
As this trigger gets called early in the Apache stack, EPrints possibly won't copy the file from e.g. archives/ARCHVIEID/cfg/static/.well-known/file to archives/ARCHVIEID/html/static/.well-known/file - so you might need to do this manually.

If you need to generate content for the .well-known URL dynamically, I can provide some suggestions to create a handler.

Cheers,
John

-----Original Message-----
From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> On Behalf Of Yuri
Sent: 11 February 2025 16:35
To: EPrints.org Technical List <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] Eprints and .well-known

CAUTION: External Message. Use caution opening links and attachments.

CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hi!

  I'm unable to make .well-know work in Eprints. I've changed generate_static to allow it, the directory is created under <repo>/cfg/lang/en/ but accessing it via url /.well-known/afile does not work. Do I need Additional Notes in
https://eur03.safelinks.protection.outlook.com/?url=""
 0608dd4abbcc04%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638748892632612446%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=B0l7vuIV87OBSpq8g2HF3tHPRS0A9sRsLHmgeJPxLCQ%3D&reserved=0 ?

  thanks!


*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List
*** Archive: https://www.eprints.org/tech.php/
*** EPrints community wiki: https://wiki.eprints.org/


*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List
*** Archive: https://www.eprints.org/tech.php/
*** EPrints community wiki: https://wiki.eprints.org/

-- 
Yuri Carrer

 CAB - Centro di Ateneo per le Biblioteche, Università di Padova
 Tel: 049/827 9712 - Via Beato Pellegrino, 28 - Padova