accesslimit status

accesslimit status

Displays IP address limitation and Basic Authentication settings. Valid only with nginx.
It is possible to configure separately for the profile's WordPress admin page and for the profile's document root.
For example, you can set Basic Authentication for the WordPress admin page and deny access to the document root from a specified IP address.

Example

kusanagi accesslimit status kusanagi_html

Options

Target to Set IP Address limitation or Basic Authentication

[--adminpage | --documentroot]

Default : --adminpage

Specifies the target for setting IP address restriction and Basic Authentication.
If "--adminpage "is specified, it is set for the WordPress admin page of the profile, it will not be effective for non-WordPress profiles.
If "--documentroot "is specified, it is set to the DocumentRoot of the profile.

Profile Name

[profile]

Default: The current directory profile

If "profile" is specified, the "accesslimit" of the specified profile will be processed.
However, if the current directory is not a profile, an error will occur.

Output

# kusanagi accesslimit status kusanagi_html
Access to admin page is limited.
----------------------------------------
location ~* /wp-login\.php$|/wp-admin/((?!(admin-ajax\.php|css/|images/|js/)).)*$ {
    satisfy any;
    allow 127.0.0.1;
    deny all;
    auth_basic "basic authentication";
    auth_basic_user_file "/home/kusanagi/.htpasswd";

----------------------------------------
accesslimit completed.