May be a duplicate of "How to store a private RSA key for an application?"
So I was asked to make a web interface in PHP that allows visitors to check the signature of a file using SHA 256 with RSA encryption and, in a restricted area, authorized users can create signature for given files. The application will be certainly running on shared web hosting services, on the internet (not in a local network). I know that there is no 100% reliable way to store private keys, but what are the principal options that I have to store that private key the safest way ?
Side note : I know that the idea of creating a web interface for such a task is not safe, and it would be way more secure to only publish the public key and let the end users check themselves the signature, but that's what my client absolutely wants, so ...