Skip to content

Commit

Permalink
(WIP #77) Syntax: GHFMD code blocks
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Harmon <[email protected]>
  • Loading branch information
JoshHarmon committed Oct 24, 2015
1 parent b4e2608 commit bf8dbbd
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions 1.8/administration/security/protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ First, create a new file in the Admin CP directory named .htaccess. Apache will

- Open the `.htaccess` file
- **ADD**:
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName Restricted
AuthType Basic
require valid-user
- Run shell command:
htpasswd -c -b /path/to/.htpasswd desired_username desired_secure_password
```
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName Restricted
AuthType Basic
require valid-user
```
- Run shell command: `htpasswd -c -b /path/to/.htpasswd desired_username desired_secure_password`
- **NOTE:** Replace `/path/to/.htpasswd` in both places with the respective file location.

## Nginx Basic Auth Configuration (with SSH)
Expand All @@ -62,34 +63,27 @@ Let's begin:

- Open your nginx site configuration file.
- Within the `server` block, **ADD**

location /path/to/ACP {
auth_basic "Restricted";
auth_basic_user_file /path/to/.htpasswd;
}

- Run shell command:

htpasswd -c -b /path/to/.htpasswd desired_username desired_secure_password

```
location /path/to/ACP {
auth_basic "Restricted";
auth_basic_user_file /path/to/.htpasswd;
}
```
- Run shell command: `htpasswd -c -b /path/to/.htpasswd desired_username desired_secure_password`
- If the command is not found, install the `apache2-utils`, `httpd-utils`, or similar package for your Linux distribution.

- **NOTE:** Replace `/path/to/.htpasswd` in both places with the respective file location.
- **NOTE:** Replace `/path/to/.htpasswd` in both places with the respective file location.

# Configuring an Admin CP PIN

With MyBB 1.8, an Admin Control Panel "Secret PIN" setting was added to the core, inspired by a popular community tutorial. To enable the PIN:

- Open `inc/config.php`

- **FIND** or **ADD**:

{% highlight php startinline %}
$config['secret_pin']
{% endhighlight %}

- Set the variable to a value, such as `'S0me p1n'`.

- **DONE**

**Example:**
Expand Down

0 comments on commit bf8dbbd

Please sign in to comment.