We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • There shouldn’t be any problems with it; the only tricky part would be setting up the equivalent .htaccess rewrite rules. As long as PHP and MySQL are working, MODx won’t care.
      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
      • 22176
      • 32 Posts
      Hey Stefan,

      Some handy info there, thank you.

      To translate Apache rewrites over to Nginx equivalents, try this cool tool ..

      http://www.anilcetin.com/convert-apache-htaccess-to-nginx/

      And if all that doesn’t work, set down what you’re trying to do and I’ll see if I can help.

      At guvnr, I’m just posting up some VPS Admin tuts now about some basic rewrites too, if that helps.

      Best2u.
        www.Guvnr.com

        .. blogging 'bout a way wider web

        Currently publishing - a 20 part video series:-

        Set Up Unmanaged VPS (4 Newbies) .. The V-P-S Bible
        • 33337
        • 3,975 Posts
        I also tried to install MODx with nginx, (thanks the_guv for writing nice tutorial for vps). MODx Evo runs fantastically without any issues.

        It was very first attempt at Linux server command line stuff for me. Either I did good job or tutorials/information was real good. (I think the later though.)

        However, MODx Revolution is not working on my vps atm. I am going to re-build the VPS with less hacking (read errors) again and will try again.

        Please keep your experiences posted here related to nginx and MODx!

        Thanks.
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 22176
          • 32 Posts
          Quote from: zi at Aug 13, 2009, 02:43 PM

          However, MODx Revolution is not working on my vps atm.

          hey zi,

          tx for kind words .. praise indeed from you, sir.

          tell me, did you sort revolution?

          i have a copy of 0963 working fine on nginx, for the record, but I know that’s a bit old fashioned tongue

          splendid to make your acquaintance .. i recall some of your modx forum comments have helped me too, thank you.
            www.Guvnr.com

            .. blogging 'bout a way wider web

            Currently publishing - a 20 part video series:-

            Set Up Unmanaged VPS (4 Newbies) .. The V-P-S Bible
            • 20843
            • 6 Posts
            I haven’t tried Revolution, but I’m running Evolution without any problems. Perhaps I’ll load up a new virtual server and mess with it. I’m looking to move away from Wordpress, so this might be an interesting project to do it with (of course, I will document and post it...)

            I tried upgrading this week to PHP 5.3 running PHP-FPM. Didn’t go too bad, except, APC would not compile into PHP (kept getting errors). I used the dotdeb packages, after trying to get 5.3 to compile and install properly, but no luck. It was a nightmare (Running Ubuntu 9.04 Jaunty). FPM ran well, I just didn’t feel like compiling and the config’s etc were completely in different places. I guess I’ll wait for an official Ubuntu package for 5.3 and php-fpm (I read php-fpm is supposed to be bundled into 5.3). I have to mess with it in a VM first to get the trick.
              • 20843
              • 6 Posts
              Also:

              location ~ \.php(/|$) {
                      include fastcgi_params.modx;
              }
              


              The .php Should probably include a (.*) after it (if you see my original). If you pass parameters as:

              index.php/someparameters/another one

              Which is parsed (as a ghetto mod-rewrite type thing), then it will also parse that file. I have a post about that:
              http://nsslive.net/2009/03/03/pretty-php-urls-without-mod_rewrite/

                • 16872
                • 2 Posts
                Works like a charm - ty very much!
                • I’m new doing this but I am having fun while doing it. I had problems setting up the friendly urls but I managed to do it by adding the following:

                              location /  {
                                          index  index.php index.html;
                                          if (!-e $request_filename)
                                          {
                                          rewrite ^/(.*)$ /index.php?q=$1 last;
                                          }
                                     }


                  I’m not done testing the site tho, I’ll post anything else here if I find more info.

                  Jose R. Lopez
                  • I felt like doing some tests between my server with apache and the one with nginx and I was shocked. Please don’t assume my values as a benchmark, this was just a heavy page which usually takes a long time to load that I decided to test through both web servers (its a gallery page using maxigallery with a crap load of pictures and thumbnails).

                    The slower test is a live site (though I tested while there was not much traffic). It is running CENTOS5 on a vps.

                    Document Parsing Data:
                    MySQL: 0.1113 s
                    440 request(s)
                    PHP: 4.3042 s
                    total: 4.4155 s
                    document retrieved from database.

                    and exactly the same page but on a vps with Ubuntu 10.04 and using nginx with fastcgi using php-fpm.

                    Document Parsing Data:
                    MySQL: 0.0796 s
                    440 request(s)
                    PHP: 1.7076 s
                    total: 1.7872 s
                    document retrieved from database.

                    Both VPS have exactly the same spec and they are both in the same server node (its a Virtuozzo setup).

                    Like I said, this is in no way a benchmark but more like a quick test of the same page on different setups.

                    Cheers,
                    Jose R. Lopez
                      • 22079
                      • 5 Posts
                      Hi,

                      Im using php5.3 on nginx 0.8.53 with FPM on revo.

                      When trying the mentioned configuration, all I get is 404’s.
                      Friendly url’s is turned on, friendly aliases is turned off. (so the suffix is dropped)

                      I’ve also added this:
                      if (!-e $request_filename)
                      {
                       rewrite ^/(.*)$ /index.php?q=$1 last;
                      }
                      


                      Without any luck.

                      Im short in time, so I cannot really delve into this sad


                      Any help is appreciated!
                      -----

                      I got it to work!

                      friendly aliases was off, goes i thought *that* would get rid of suffix
                      after editing content types, turning back friendly_aliases things started working shocked)

                      this i had wrong too:
                      fastcgi_param SCRIPT_FILENAME /home/www/mylogin/htdocs/$fastcgi_script_name;
                      Which has to point to the document_root. And was wrong in the original config
                      for nginx+fpm setup. Website i cannot remember. But it stated /scripts/$fastcgi_script_name;

                      well, going to sleep now and setup the rest of the site!