• Resolved jungerm

    (@jungerm)


    Hello,

    When I try to activate your plugin, it tells me that it can’t update “nginx.conf” so I have to do it myself.

    I have to put that :

    location / {
    rewrite ^newloginurl/?$ /wp-login.php break;
    rewrite ^postpass/?$ /wp-login.php?action=postpass break;
    rewrite ^logout/?$ /wp-login.php?action=logout break;
    rewrite ^lostpassword/?$ /wp-login.php?action=lostpassword break;
    rewrite ^resetpass/?$ /wp-login.php?action=resetpass break;
    rewrite ^register/?$ /wp-login.php?action=register break;
    }

    But when I put it in my domain config, it doesn’t work. I cannot connect neither to wp-admin and newloginurl.

    Have you an idea about how I can resolve it?

    https://wordpress.org/plugins/sf-move-login/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Grégory Viguier

    (@greglone)

    Hello.

    I’m not very familiar with nginx, so I’ll have to investigate.
    I understand you added it inside a server block, correct?

    Greg

    Thread Starter jungerm

    (@jungerm)

    Hello

    Yes I’ve added it in the server block but it doesn’t change anything.

    Max

    Plugin Author Grégory Viguier

    (@greglone)

    OK. Seeing the first line location / {, I guess your site is at the root of the domain, not in a subfolder. e.g. example.com, not example.com/my-site.
    Move Login will be included in SecuPress (a security plugin) and the early access will be released soon, so I guess I’ll have more data to work with and find where the problem is.
    Thanks.

    I can confirm that there is a problem with generated nginx configuration. I just tried the functionality for moving login url (on SecuPress Pro) and now I am locked out of my site :/

    Plugin Author Grégory Viguier

    (@greglone)

    Hi there.

    I’m currently working in SecuPress to make the functionality work on nginx. I made some progress and so far it works great (it’s not released yet, it needs more testing).
    So, I can give you the right configuration but I need to know:
    – Multisite?
    – Site at the root of the domain?
    – WordPress in its own directory? (https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory)

    Greg

    Hi, that are good news 🙂
    – It’s not multisite
    – Yes, at the root of the domain
    – The wordpress address (URL) and site address (URL) are the same. All the files are under /var/www/html/ and I didn’t moved index.php outside, so I guess it doesn’t have it’s own directory.

    Thanks

    Plugin Author Grégory Viguier

    (@greglone)

    Hi.

    So, basic stuff.
    This should go directly inside your server block, no location block:

    rewrite ^/hello/?$ /wp-login.php last;
    rewrite ^/bye-bye/?$ /wp-login.php?action=logout last;
    rewrite ^/join-the-club/?$ /wp-login.php?action=register last;
    rewrite ^/i-should-use-a-password-manager/?$ /wp-login.php?action=lostpassword last;
    rewrite ^/death-star/?$ /wp-login.php?action=resetpass last;
    rewrite ^/postpass/?$ /wp-login.php?action=postpass last;

    Yup, that did the job. And good URL naming btw 🙂

    Thanks

    Plugin Author Grégory Viguier

    (@greglone)

    Good to know.
    Have a good day.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Nginx’ is closed to new replies.