ssh into a server which is connected to a VPN service

I have a virtual private server, which I would like to run a web server while my server is connected to a VPN service When the VPN connection to my provider is not up, I can do anything I want with