Has anyone deployed a MODX app using Nginx? I’m using a LEMP stack on Ubuntu and I would like to be able to utilise MODX’s friendly urls.
Having more experience with Apache, I’m unsure of what re-write rules Nginx requires in the configuration file.
Thanks
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Never mind, don’t use that one. In an nginx environment its better not to use an if statement, so try this one:
Please give a report if you got any luck with this config
I haven’t used MODx before but nginx is pretty smooth to use. You probably need something like this:
Try to use that, and please give a report when done. Hope this will work for you.
You answered just as I was posting my first response.
Your second solution (omiting the if statement also works).
Hi,
Thanks for the fast response. Your answer helped a lot!
The part:
was crucial.
My whole config files now looks like:
For others that might be looking for the same thing, I’m using MODX 2.3.5 and have the Friendly URLs system setting ON.
Thanks again.