listen 80; location ~ ^/administrator(/.*|$) { return 301 https://$http_host$request_uri; } location ~ ^/apc(/.*|$) { return 301 https://$http_host$request_uri; }