Securing PiGallery2 by client certficates via nginx proxy #678
knalltuete86
started this conversation in
Show and tell
Replies: 1 comment
-
Hi,
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One of the most interesting features of PG2 is the option to share photos and videos with your family and friends via your own self-hosted instance.
I'm running some self hosted services since years and introduced X.509 Client Certificates for Client Authentication for all of them.
Of course this is difficult as the sharing option should not be used by authenticated clients only. So my goal was
1.) Ensure access to regular instance (gallery, albums, admin area etc.) only for authenticated clients
2.) Enable access to shared media for any other clients as well.
By today I got it working as intended.
Assuming Client Authentication & SSL via nginx is working already (there're a lot of tutorials around the internet) the steps are as follows:
1.) Define your public domain in admin area, e.g. "photos.example.com"
2.) Your shared links should appear as "photos.example.com/share/hash1234"
3.) Configure your nginx site as follows:
Options like IP, Port and SSL settings has to be adjusted by your own settings.
Have fun and stay safe
Beta Was this translation helpful? Give feedback.
All reactions