apache + nginx: PHP HTTPS protocol detection