I am running docker OpenVPN on a VPS and I have no problem to access the VPN or the admin interface with its ip on port 9443.
But I'd like to use it through a url like vpn.mydomain.com.
I have found some topics about it but is is not clear to me how to configure a reverse proxy with nginx.
server {
listen 943 ssl http2; <-- I tried here 443 but still a 502 error
server_name vpn.mydomaine.com;
ssl_certificate /etc/letsencrypt/live/vpn.mydomaine.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/vpn.mydomaine.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/vpn.mydomaine.com/chain.pem;
include snippets/ssl.conf;
include snippets/letsencrypt.conf;
So, is there away to access the "webserver" using an url like vpn.mydomain.com ?
and also to connect to the vpn using the same url address instead of using the ip of the server ?