Securing Admin on separate port I am attempting to secure the admin pages (/admin/*) and login page (/user/login) to port 8443. I have successfully done that with the following in apache 2.4:

&lt;VirtualHost _default_:443&gt;
    ServerName example.com:443
    ServerAlias drupal
    DocumentRoot "/opt/rh/httpd24/root/var/www/html/example.com/current"
    &lt;LocationMatch /(user|admin)&gt;
            Require all denied
    &lt;/LocationMatch&gt;
&lt;/VirtualHost&gt;

&lt;VirtualHost *:8443&gt;
    ServerName example.com:8443
    ServerAlias drupal
    DocumentRoot "/opt/rh/httpd24/root/var/www/html/example.com/current"
&lt;/VirtualHost&gt;


The problem I am having is when I go to https://www.example.com:8443/user/login and login, I am redirected to http://www.example.com:8443/user/1.

This creates a 400 error - Bad request. Trying to serve http content over a SSL port. 

How do I tell drupal to stay on https protocol and remain on port 8443?
So I wasn't able to do this on a separate port, but for anyone who needs to secure the login page from public eye, this is what I did.

&lt;VirtualHost _default_:443&gt;
  ServerName example.com:443
  ServerAlias drupal
  DocumentRoot "/opt/rh/httpd24/root/var/www/html/example.com/current"
  &lt;LocationMatch /(user|admin)&gt;
        Require all denied
        Require ip 10
  &lt;/LocationMatch&gt;
&lt;/VirtualHost&gt;


This will require the user to be on a local IP. (I am in-housing the site, so when I access the site I'm on a local IP.)