How to setup Secure Webb server

How do I put I up a safe web server on a VPS with MariaDB and Safe phpMyAdmin with rights so it works for the development of web pages.

You won’t get an answer for that here. You can try some of the Stack Exchange groups or a Google search as a starting point, then return here with specific questions.