We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53010
    • 6 Posts
    I recently noticed that I can't login to my website manager anymore. Not even the login screen pops up anymore, it goes straight to a 401 error page. I tried refreshing browser cache, using different browsers and also manually deleting the modx cache folder content.
    The very strange thing about this is it all worked perfectly fine a few weeks before and nothing has changed in this time.

    MODX Version: 2.5.2
    PHP Version: 7

    Additionally, I use CloudFlare to cache my website and enable SSL. On there, I got the following settings:
    • DNS/HTTP Proxy
    • Flexible SSL Certificate
    • Auto Minify
    • Page Rules: always use HTTPS for entire website, disable cache on /manager and /connectors
    The settings for CloudFlare were done according to this article. I tried to set CloudFlare to development mode (no cache) and even disable page rules completely.

    The content of my .htaccess file is as follows:
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^aeon-sake\.com [NC]
    RewriteRule (.*) http://aeon-sake.com/$1 [R=301,L]
    
    RewriteCond %{REQUEST_URI} \.html$
    RewriteRule ^(.*)\.html$ $1 [R=301,L]
    
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


    As I said, everything worked perfectly before. Any ideas why I can't access the manager anymore?
    Thanks in advance.

    Aeon [ed. note: aeonsake last edited this post 7 years, 4 months ago.]
      • 37105
      • 194 Posts
      It seems that the manager page has 301 state. Did you check the path settings in the config.core.php files in directories manager & core/config ?
        Codeplaza Webdesign: for professional websites at low cost
        • 53010
        • 6 Posts
        Quote from: donquicky at Dec 28, 2016, 11:57 PM
        It seems that the manager page has 301 state. Did you check the path settings in the config.core.php files in directories manager & core/config ?

        I just checked it and it seems to be fine. It worked before and I didn't change anything in the files since then.
        All that I can think of is that maybe something with the session got corrupt since I went back home from an abroad semester in Ireland (IP changed...could that cause a problem?). I tried to flush the session database - without success.
          • 53010
          • 6 Posts
          I just flew back to Ireland and the login works again.
          Any idea why? How can I prevent the same problem when I move back home?
            • 53010
            • 6 Posts
            Moved back home and can't access the Manager again...I cleared all session and cache data but it didn't help.
              • 38783
              • 571 Posts
              I'm sure you have done this, but sometimes it is easy to miss things.

              Did you add the asterisk to the directory names you were bypassing in the page rules for Cloud Flare?
              Do you have Client Config installed?

              example.com/manager/*
              example.com/connectors/*
              Note: in some circumstances you may need to add an additional bypass rule to prevent interferring with proper manager functionality when you have the Client Config Extra installed:
              example.com/assets/components/clientconfig/*

              Secondly, is it at all possible that your .htaccess file has had any ip address restrictions added to it that limit access to the Manager folder depending on your ip address.

              Finally, could the IP address in Ireland be blacklisted by Cloudflare. Although if this was the case I presume they would block access to the whole site.
                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 53010
                • 6 Posts
                Quote from: andytough at Jan 19, 2017, 01:37 AM
                I'm sure you have done this, but sometimes it is easy to miss things.

                Did you add the asterisk to the directory names you were bypassing in the page rules for Cloud Flare?
                Do you have Client Config installed?

                example.com/manager/*
                example.com/connectors/*
                Note: in some circumstances you may need to add an additional bypass rule to prevent interferring with proper manager functionality when you have the Client Config Extra installed:
                example.com/assets/components/clientconfig/*

                Secondly, is it at all possible that your .htaccess file has had any ip address restrictions added to it that limit access to the Manager folder depending on your ip address.

                Finally, could the IP address in Ireland be blacklisted by Cloudflare. Although if this was the case I presume they would block access to the whole site.

                Thanks for your reply, I checked everything you said and found out that it is CloudFlare which causes the problem. When I disable the CloudFlare DNS and HTTP proxy (CDN) in the DNS settings the manager works again. I couldn't figure out how to fix it though.

                - I have asterisks in the correct places of the url (using this support article), looking like this:
                http://*example.com/* -- always use HTTPS
                *example.com/manager/* -- Cache Level: Bypass
                *example.com/connectors/* -- Cache Level: Bypass
                I doubt that the page rules are the problem because it worked perfectly in Ireland.

                - What do you mean with "Client Config" ? Is that a ModX extension or something for the browser?

                - The .htaccess file doesn't contain any IP address restrictions.

                - I'm currently in Austria (home) but I installed ModX while being abroad in Ireland. I can access any public page from my website, even forum subdomain etc.


                It seems like CloudFlare doesn't recognize my home IP address, or even blocks it, but their support doesn't reply to me about this problem. Any other ideas how to solve this?
                  • 38783
                  • 571 Posts
                  Yes, "Client Config" is an extra. If you haven't installed it don't worry about that one.

                  I tried accessing your site via an Austrian proxy: http://webproxy.at/

                  http://aeon-sake.com loaded OK, but http://aeon-sake.com/manager resulted in a 401 error.

                  Suggesting that perhaps the manager is blocked from all of Austria by Cloudflare?

                  It might be worth getting in touch with these guys. They seem knowledgable about MODX and Cloudflare https://github.com/DashMedia/PurgeCloudFlare



                    If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                    email: [email protected] | website: https://andytough.com
                    • 37105
                    • 194 Posts

                    I just flew back to Ireland and the login works again.
                    I suggest to stay in Ireland smiley

                    Has it been solved by CloudFlare?
                      Codeplaza Webdesign: for professional websites at low cost