I have installed pi-hole + openvpn on my rpi 4 and am very please about the setup. Now I would like to simultaneously like to use the rpi for hosting a public personal website, referred to by the domain www.myname.com and most likely containing just some basic html.
What is the way to go to achieve this? I don’t really care if my web page uses lighttpd, apache, nginx or something else entirely. The problem with using lighttpd is that opening port 80 on my router opens the pihole admin panel to the whole internet. I can also install apache and let it listen to another port, but don’t think it is possible to let a domain name refer to a port other than 80.
I should point out that I have a programming background but am a bit of a Linux / networking novice. I also searched some old threads, some of which describe similar issues but none has answered the question above. Any advice is very welcome, many thanks in advance.