Bubka3 Posted August 22, 2013 Share Posted August 22, 2013 (edited) Here's the Apache Rewrite rules converted to nginx for WHMCS: # Announcementsrewrite ^/announcements/([0-9]+)/[a-zA-Z0-9-]+\.html$ /./announcements.php?id=$1 last; rewrite ^/announcements$ /./announcements.php last; # Downloads rewrite ^/downloads/([0-9]+)/([^/]*)$ /./downloads.php?action=displaycat&catid=$1 last; rewrite ^/downloads$ /./downloads.php last; # Knowledgebase rewrite ^/knowledgebase/([0-9]+)/[a-zA-Z0-9-]+\.html$ /./knowledgebase.php?action=displayarticle&id=$1 last; rewrite ^/knowledgebase/([0-9]+)/([^/]*)$ /./knowledgebase.php?action=displaycat&catid=$1 last; rewrite ^/knowledgebase$ /./knowledgebase.php last; Last Updated for version: 5.2.7 Notice: You'll want to place these directly in the server { } block for your WHMCS domain. Putting them under a location { } will break the rules! Edited August 22, 2013 by Bubka3 1 Quote Link to comment Share on other sites More sharing options...
BryanB Posted August 25, 2013 Share Posted August 25, 2013 Awesome. Thanks. I was planning to switch over to Nginx soon. Was it pretty simple? Any other issues with whmcs? Did you notice any performance gains? 0 Quote Link to comment Share on other sites More sharing options...
TommyK Posted August 26, 2013 Share Posted August 26, 2013 PHP is still limiting the performance, but overall it is still a snappier experience to run whmcs under nginx. Static resources are loading crazy fast. It's not super hard, but it all depends on what you think is hard. I will never go back to apache with whmcs. 0 Quote Link to comment Share on other sites More sharing options...
Bubka3 Posted August 26, 2013 Author Share Posted August 26, 2013 I'm running php-fpm with pagespeed and APC on the backend. The server is snappy and responsive now. I also ran all the images through http://smush.it which helped remove a lot of waste from all my images (WHMCS files included). 0 Quote Link to comment Share on other sites More sharing options...
ivaserver Posted September 5, 2013 Share Posted September 5, 2013 Hi I have been running NGINX for months. I did not know anything needed to be changed on the server and all seems to be running OK. What is the edit supposed to fix? Thanks 0 Quote Link to comment Share on other sites More sharing options...
Bubka3 Posted September 5, 2013 Author Share Posted September 5, 2013 This allows you to enable SEO friendly URLs for Knowledge, Announcements, and Downloads. 1 Quote Link to comment Share on other sites More sharing options...
ivaserver Posted September 6, 2013 Share Posted September 6, 2013 That's great thanks. 0 Quote Link to comment Share on other sites More sharing options...
ricardo777 Posted October 5, 2013 Share Posted October 5, 2013 Thank you come in handy. 0 Quote Link to comment Share on other sites More sharing options...
kpedana Posted December 19, 2013 Share Posted December 19, 2013 I'm a little late to the party but is there anyway to have it show the category name of the KB article instead of (what appears to be) the actual "number" of the article? Basically it's currently: /knowledgebase/1/TESTKB but you'd think it SHOULD be: /knowledgebase/CATNAME/TESTKB ----- Same with announcements, looks like it's using the same "number" system instead of simply announcements/3/TESTANNOUNCE.html it should be announcements/TESTANNOUNCE.html, no? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.