Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


WHMCS on nginx
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

WHMCS on nginx

Hello, can someone help me with the nginx configuration for WHMCS? I have trouble making it work.

Thank you

«1

Comments

  • Summer is coming

  • hostdarehostdare Member, Patron Provider

    @lion said:
    Summer is coming

    winter is coming , Mr snow

  • Winter Hosting is my thing. Go away

  • winnervpswinnervps Member, Host Rep

    winter is coming , Mr snow

    U now nothing jon snow

  • MrHMrH Member

    Vesta?

  • @lion said:
    Summer is coming
    @hostdare said:

    @lion said:
    Summer is coming

    winter is coming , Mr snow
    @vovler said:
    Winter Hosting is my thing. Go away
    @winnervps said:

    winter is coming , Mr snow

    U now nothing jon snow

    This joke is getting old now. BTW I have been using WHMCS for 4 years now. I am moving all my sites to nginx, that's why I need help.

  • MasonRMasonR Community Contributor

    Can you be more specific on what isn't working?

    Looks like you'll have to create a few rewrite rules:
    https://www.scalescale.com/tips/nginx/whmcs-nginx-configuration/
    https://whmcs.community/topic/269693-switched-to-nginx-what-are-the-proper-rewrite-rules/

  • @MasonR said:
    Can you be more specific on what isn't working?

    Looks like you'll have to create a few rewrite rules:
    https://www.scalescale.com/tips/nginx/whmcs-nginx-configuration/
    https://whmcs.community/topic/269693-switched-to-nginx-what-are-the-proper-rewrite-rules/

    Well, I am no expert on nginx so I would love to have all the config. If someone can provide it, it would be great. Otherwise I have to test a few hours and see.

  • @drdrake

    why are you intending to move to nginx? if you are not familiar with it, i don't think it's a wise move.

  • drdrake said: I am moving all my sites to nginx, that's why I need help.

    Then it's definitely an area you should spend some time practicing and getting familiar with, as a host...

    Thanked by 1raindog308
  • @Chalipa said:
    @drdrake

    why are you intending to move to nginx? if you are not familiar with it, i don't think it's a wise move.
    @dedipromo said:

    drdrake said: I am moving all my sites to nginx, that's why I need help.

    Then it's definitely an area you should spend some time practicing and getting familiar with, as a host...

    I said I am not an expert, but I have been running about 10 php apps on ngix for a year now. I just am not good at writing custom rewrite rules.

  • raindog308raindog308 Administrator, Veteran

    drdrake said: I said I am not an expert, but I have been running about 10 php apps on ngix for a year now. I just am not good at writing custom rewrite rules.

    Fair enough...did you try the link @MasonR provided?

    https://whmcs.community/topic/269693-switched-to-nginx-what-are-the-proper-rewrite-rules/

  • @raindog308 said:

    drdrake said: I said I am not an expert, but I have been running about 10 php apps on ngix for a year now. I just am not good at writing custom rewrite rules.

    Fair enough...did you try the link @MasonR provided?

    https://whmcs.community/topic/269693-switched-to-nginx-what-are-the-proper-rewrite-rules/

    They are from .htaccess, used in apache and not nginx.

  • PieHasBeenEatenPieHasBeenEaten Member, Host Rep

    Just use centminmod

  • @PieNotEvenEaten said:
    Just use centminmod

    Rewrite rules are still needed.

  • @drdrake said:

    @PieNotEvenEaten said:
    Just use centminmod

    Rewrite rules are still needed.

    Why don’t you tell us what rewrite rules you need? Jeez.

  • @doghouch said:

    @drdrake said:

    @PieNotEvenEaten said:
    Just use centminmod

    Rewrite rules are still needed.

    Why don’t you tell us what rewrite rules you need? Jeez.

    All the required rewrite rules needed for WHMCS to work.

    I saw that announcements, downloads and knowledgebase didn't work.

  • MasonRMasonR Community Contributor

    @drdrake said:

    @doghouch said:

    @drdrake said:

    @PieNotEvenEaten said:
    Just use centminmod

    Rewrite rules are still needed.

    Why don’t you tell us what rewrite rules you need? Jeez.

    All the required rewrite rules needed for WHMCS to work.

    I saw that announcements, downloads and knowledgebase didn't work.

    Did you even try the rules in my first link I posted previously? Literally has the nginx rewrite rules for those three sections.

  • @MasonR said:

    @drdrake said:

    @doghouch said:

    @drdrake said:

    @PieNotEvenEaten said:
    Just use centminmod

    Rewrite rules are still needed.

    Why don’t you tell us what rewrite rules you need? Jeez.

    All the required rewrite rules needed for WHMCS to work.

    I saw that announcements, downloads and knowledgebase didn't work.

    Did you even try the rules in my first link I posted previously? Literally has the nginx rewrite rules for those three sections.

    Yes, they didn't work.

  • SamPSamP Member
    edited October 2017

    There is WHMCS autoinstaller in virtualmin, which supports nginx, never tried it though.

  • vovlervovler Member
    edited October 2017

    You have websites that do this for you instantly and free. Never tested any of them, but they are worth giving a try.

    https://winginx.com/en/htaccess

    http://www.anilcetin.com/

    https://labs.gidix.de/nginx/

  • @vovler said:
    You have websites that do this for you instantly and free. Never tested any of them, but they are worth giving a try.

    https://winginx.com/en/htaccess

    http://www.anilcetin.com/

    https://labs.gidix.de/nginx/

    They don't work. I have tested them.

  • doghouchdoghouch Member
    edited October 2017

    @drdrake Do you really expect us to hold your hand all the way?

    Edit: I really don’t want to sound like an a*s, but you’re not giving enough information. Are you using the standard NGINX config?

    Edit 2: If you want, I’ll convert the .htaccess file for you.

    Thanked by 1MasonR
  • @doghouch said:
    @drdrake Do you really expect us to hold your hand all the way?

    Edit: I really don’t want to sound like an a*s, but you’re not giving enough information. Are you using the standard NGINX config?

    Edit 2: If you want, I’ll convert the .htaccess file for you.

    Sorry. I am using the standard configuration which works will all other PHP apps. The app itself works fine except announcements, downloads and knowledgebase links.

  • @drdrake said:

    @doghouch said:
    @drdrake Do you really expect us to hold your hand all the way?

    Edit: I really don’t want to sound like an a*s, but you’re not giving enough information. Are you using the standard NGINX config?

    Edit 2: If you want, I’ll convert the .htaccess file for you.

    Sorry. I am using the standard configuration which works will all other PHP apps. The app itself works fine except announcements, downloads and knowledgebase links.

    Which WHMCS version are you running? The configuration differs from 5.3.* and 6/7.

  • @doghouch said:

    @drdrake said:

    @doghouch said:
    @drdrake Do you really expect us to hold your hand all the way?

    Edit: I really don’t want to sound like an a*s, but you’re not giving enough information. Are you using the standard NGINX config?

    Edit 2: If you want, I’ll convert the .htaccess file for you.

    Sorry. I am using the standard configuration which works will all other PHP apps. The app itself works fine except announcements, downloads and knowledgebase links.

    Which WHMCS version are you running? The configuration differs from 5.3.* and 6/7.

    I am using whmcs 7.

  • mattwservicesmattwservices Member
    edited October 2017

    The rules in the link posted by MasonR should be all that is needed. I'm using them on nginx 1.13 with WHMCS7 and they work.

    ` rewrite ^/announcements/([0-9]+)/[a-zA-Z0-9-]+.html$ /./announcements.php?id=$1 last;
    rewrite ^/announcements$ /./announcements.php last;

        rewrite ^/downloads/([0-9]+)/([^/]*)$ /./downloads.php?action=displaycat&catid=$1 last;
        rewrite ^/downloads$ /./downloads.php last;
    
        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;`
    
    Thanked by 1eva2000
  • @mattwservices said:
    The rules in the link posted by MasonR should be all that is needed. I'm using them on nginx 1.13 with WHMCS7 and they work.

    ` rewrite ^/announcements/([0-9]+)/[a-zA-Z0-9-]+.html$ /./announcements.php?id=$1 last;
    rewrite ^/announcements$ /./announcements.php last;

        rewrite ^/downloads/([0-9]+)/([^/]*)$ /./downloads.php?action=displaycat&catid=$1 last;
        rewrite ^/downloads$ /./downloads.php last;
    
        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;`
    

    Are you sure? I used them but announcements and other menus didn't work. Do you mind sending me a link to your whmcs site?

  • Here's a tastefully redacted copy of our nginx.conf on latest WHMCS. Hope it helps.

    https://pastebin.com/GEuSniDT

  • It looks like I had to move some config at the end of the file. Now it works. Thanks everyone!! :)

Sign In or Register to comment.