Jump to content

WHMCS NGINX web server rewrite rules


Recommended Posts

Here's the Apache Rewrite rules converted to nginx for WHMCS:


# Announcements

rewrite ^/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 by Bubka3
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 weeks later...
  • 2 months later...

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:




but you'd think it SHOULD be:






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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated