We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34903
    • 4 Posts
    After moving a ModX site (Evolution 1.0.4 version) from on server to another, I’ve since ran into a number of permissions issues that I can’t seem to get around. Basically, the site loads normally straight from the cache, but with cache disabled and the cache files temporarily renamed so to force the site to load from the database, I get an unstyled page. Checking the source code and then clicking through on the stylesheet links, I get a 403 forbidden error.

    I’ve made sure the permissions in the relevant access subfolders are set as the moving site guide in the documentation recommends, and tried various other things to try to get it to work, but to no avail. Must the server be configured in a specific way in order to avoid 777 permission settings, or just to get it to work, even with 777 permissions set in the necessary areas?
      • 21257 MODX Staff
      • 730 Posts
      Are your CSS files actual files, or MODX Resources?
      Is it possible there’s a base_href in the head of your page that is pointing to the wrong server?
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 34903
        • 4 Posts
        The CSS seems to be generated, as it is coming from .html files (since that is the suffix setting on database side), and there is a base tag in the template pointing to the right domain. On the last bit, the base tag is coming up properly. What isn’t appearing is the styling, because all I’m getting is 403 errors from the links, saying I "don’t have permission to access /index.php on this server".
          • 21257 MODX Staff
          • 730 Posts
          Is it possible to post the URL of the site publicly?
            Mike Schell
            Lead Developer, MODX Cloud
            Email: [email protected]
            GitHub: https://github.com/netProphET/
            Twitter: @mkschell
            • 34903
            • 4 Posts
            http://79.170.44.81/stjohnscollege.co.uk/

            Placeholder domain for the hosting of the moved site. I disabled the cache to ensure you see the problems going on. However, on further poking around, it seems that all the links are broken, and all go to 403 forbidden errors. So now, I’m even more stumped as to what the issue is. Does ModX require to have PHP be run as FastCGI with suexec? Previous server configuration might be the issue here, but if so, then what I have done already hasn’t got it to work. In any case, further info is as follows:

            Web Server: Apache 2
            MySQL server version: 5.1.57-log
            MySQL client version: mysqlnd 5.0.8-dev - 20102224 - $Revision: 308673 $

            And I think it is a PHP 5.2 version being run, if I recall correctly.
              • 21257 MODX Staff
              • 730 Posts
              Does your .htaccess file have the following?
              RewriteBase /stjohnscollege.co.uk/
                Mike Schell
                Lead Developer, MODX Cloud
                Email: [email protected]
                GitHub: https://github.com/netProphET/
                Twitter: @mkschell
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                No, MODx runs as well on any type of PHP implementation. Some folders and files may need to have looser permissions if coming from a server that used suexec; for example the assets/cache folder and all of its files have to be writable.

                Temporary URLs are always a problem with rewriting URLs. Different configurations require different solutions. Usually I find it easiest to simply not use friendly URLs until the domain’s final URL is available.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 34903
                  • 4 Posts
                  And yeah, the tweak to the .htaccess rewrite base rule was the issue.

                  Thanks for the info and it all should be working in the mean time. Cheers!