Setup VPS for Linux Noobs!




new password?
login
X

Setup Unmanaged VPS 4 Linux Noobs! Forums vpsBible Suggestions & Requests Suggestion – permit access to wp-admin by trusted ip

This topic contains 5 replies, has 4 voices, and was last updated by  gizmos forgeeks 3 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7712

    the_guv
    Member

    splendid Barnaby . superb.

    #7724

    Benja
    Member

    @Barnanby,

    Here comes the noob! If not using stackscripts, where would this have to go to take effect? Thanks in advance.

    #7726

    Barnaby
    Member

    It goes in the nginx configuration file just before the final }

    /usr/local/nginx/sites-available/domainname.com

    #7728

    Benja
    Member

    Many many thanks @Barnaby!

    #8063

    One other note. If your wp-admin/ dir is not at the top-level of your htdocs. For example, let’s say it’s in /wp/wp-admin, then you’ll need to ditch the ^s at the start of the string. So for example, the last 4 lines would look like:

    if ($remote_addr != "12.34.56.78") {

    rewrite /wp-admin/(.*)$ /index.php?q=$1 last;

    rewrite /wp-login.php(.*)$ /index.php?q=$1 last;

    }

    Cheers and thx @Barnaby

    PS> Spotted a similar explanation that talked about allowing wp-comments-post.php here: http://www.phrison.com/securing-arbitrary-uris/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.




Both comments and pings are currently closed.

Got a Question? Want to Comment?

This site has no comments system. We've got a better system!

Please use the link at the top of the post and goto this topic's forum thread:-

  • to help build community
  • for a superior knowledge base
  • to keep info in one place, not diluted between forum & comments.

For those posts ported from Guvnr.com (pre-Feb/2010), archive comments remain.

Handy info from these comments is in the process of being ported to the forum and attributed to the original author.

If you think this idea sucks, let me know.

Thank you.