Protecting admin.php, the /install directory, and test & development installations using .htaccess

Protecting admin.php, the /install directory, and test & development installations using .htaccess

Log in to cPanel
Click on Password Protect Directories
Select Web Root
Click on the forum root folder
Check Password protect this directory
Name it as "ACP"
Click Save

I did that and got internal server error and cannot access the site. ;)
 
I figured it out. When I pw protected the public_html directory it would mess up the snippet I already added in the htaccess file. I had to pw protect the direct first then remove what cpanel added and put back the snippet.
 
Following the instructions, I clearly don't know what the "forum root directory" is bc it blocks everyone from main site. I went to "web root" and picked the top listed which was "public_html"

Can someone give me an example of their forum root folder?
 
It is wherever you have it installed - the same place where the admin.php file is.
 
I did steps out of order. it auto altered the .htaccess before I put new code in, and they conflicted. Works fine thanks! Do steps in order lol
 
This doesn't work for me. I've tried the code at the beginning and end of the file, but I keep getting a 403 forbidden error when trying to access admin.php? Does it matter that I'm on Litespeed?

<Files admin.php>
Order Deny,Allow
Deny from all
Allow from ******
</Files>
 
Thank you for this resource @Brogan

Because I am new to Xenforo, besides admin.php and directory /install/, beside the two of them, are there any other specific files or directories that we should put extra protection on?
 
Log in to cPanel
Click on Password Protect Directories
Select Web Root
Click on the forum root folder
Check Password protect this directory
Name it as "ACP"
Click Save

I did that and got internal server error and cannot access the site. ;)

I get same error: how did you fix i didn't understand :)

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
 
Check the server error log - it should have an entry related to that which may help with identifying the cause.
 
Check the server error log - it should have an entry related to that which may help with identifying the cause.

This is error i get : I removed my ip and site name. If you want more info i can pm it :) What error is that?

ip..- name [25/May/2016:10:00:32 +0200] "GET /admin.php HTTP/1.1" 500 553 "http://domain.com :) /" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
 
Top Bottom