Log in

View Full Version : ADMINCP question...


Michael Morris
11-05-2004, 10:41 AM
What changes would be necessary to the admincp (if any) so that it would deny any attempt to access it without first establishing a SSH session with the server? Or could this access be completely setup within Apache??

Ditto MODCP

Colin F
11-05-2004, 11:17 AM
What does SSH have to do with HTTP?

Do you mean a secure connection (HTTPS?)

manguish
11-05-2004, 12:49 PM
Why not just use .htaccess?

Colin F
11-05-2004, 01:16 PM
Why not just use .htaccess?
well htaccess isn't really comparable to a secure connection.

htaccess blocks access to the page, but any data you send over the web will be just as easily readable by someone else as if there were no htaccess. A secure connection would encrypt the data being sent between your pc and the server.

Michael Morris
11-05-2004, 11:16 PM
Ah, HTTPS - sorry about that - tis what I was gunning at (secure http protocol).

Link14716
11-06-2004, 01:53 AM
Put this in /admincp/global.php and /modcp/global.php somewhere (should work).

if ($_SERVER['SERVER_PORT'] == 80) {
print "You must use HTTPS!";
exit;
}

Michael Morris
11-06-2004, 02:53 AM
Hmm.. Wouldn't a standard redirection work better?


if ($_SERVER['SERVER_PORT'] == 80)
{
eval(print_standard_redirect('redirect_secure'));
}


And then define the phrase redirect_secure

Link14716
11-06-2004, 03:32 AM
Better yet:
if ($_SERVER['SERVER_PORT'] != 443) {
header("Location: https://www.yourforum.com/forum/admincp");
exit;
}