- Method using php
<?php $file = 'config.ovpn'; header("Content-Disposition: attachment; filename=\"config.ovpn\""); header('Content-type: application/ovpn'); readfile($file); ?>- Method in apache2 using
.htaccessfile
<Files "config.ovpn"> ForceType application/ovpn Header set Content-Disposition "attachment" </Files>