FreePBX with NGINX

I know this topic is mentioned in 2020, and see a snippet from the NGINX site configuration information.
Reason for this post is to try to understand how FreePBX approach Asterisk and which files are involved. As far I could understand is FreePBX the replacement from the Digium website approach.
What is the role NodeJS play in the FreePBX setup and maybe the combination with NGINX
If there are any working NGNX websites in the field I would like to know how to configure my standalone NGINX server for a good result.

I am having trouble understanding everything here. I’ll try to answer.

FreePBX is a GUI for Asterisk, it is mostly open source and a nice amount of closed source commercial modules.
FreePBX uses the default Asterisk files to include additional, custom and sometimes override conf files which allows you to add your own and override the FreePBX generated dialplan.

If you are referring to SwitchVox, then no. FreePBX is not a replacement of SwitchVox. AFAIK, it did replace TrixBox. But I may be wrong on that one.

A lot of Commercial Modules, UCP and FastAGI rely on NodeJS. There may be more.

FreePBX does not use NGINX

Not sure I understand. But if you are looking to run FreePBX with NGINX instead of Apache, it should be doable.
There are a few posts from community members who have done so.

To clarify, FreePBX needs a webserver.
‘FreePBX Distros’ have all chosen apache2 (httpd) as that wsebserver, but . . .

@billsimon has a script to configure nginx and fpm nicely

I can assure you that it works without problems.

1 Like

Another good discussion (about Caddy, but you’ll get a good understanding what FreePBX needs from the webserver)

1 Like

“Another good discussion (about Caddy, but you’ll get a good understanding what FreePBX needs from the webserver)”

That’s exact what i wanted to know, it is very difficult to find the interconnection between the different installed programs, for instance why I needed to install NodeJS before could run the FreePBX ./instrall -n.

I would like if you to keep me updated for the caddy project or maybe can give me some links with things you already did and I can implement and help testing.

Only for FreePBX I need to install Apache and still then I don’t understand where apache find the needed start index.htmp or index.php file to open the Asterisk configuration menu’s.

@billsimon has made a implementation in the year 2020 on a NGINX webserver with rewrite codes to tweak the .htaccess information into the NGINX virtual host config file. In my current NGINX server I get the error that those rewrite line’s contains to many information.

Thanks and already used that information.
I found out that with the newer generation of NGINX server implementation the rewrite instructions, those who are trying to translate the .htaccess information into a NGINX virtual host information, contains errors which I am unable to solve.
I tried to find the original Apache .htaccess file use with FreePBX and failed.
For this I placed a request to give me details about what kind of files are used in the interaction from a Webserver (Apache or NGINX) to Asterisk. From the side of Asterisk from which directory and used files to open the configuration menu’s with help of the webserver.

Thank you for your information.
My questions were only related to FreePBX and Asterisk and merely to understand the functions of files related to a webserver and the executing of those to reach the Asterisk configuration menu’s

Your answer about NodeJS was “A lot of Commercial Modules, UCP and FastAGI rely on NodeJS. There may be more.”
I presume that those modules are in the FreePBX package?

Locate them with:-

 find /var/www/html -name '*htaccess'

which will show you all such .htaccess files. All of which and more are covered by

  # disallows the things that the FreePBX .htaccess files disallow
    location ~ (/\.ht|/\.git|\.ini$|/libraries|/helpers|/i18n|/node|/views/.+php$) {
        deny all;

All things not disallowed will naturally be allowed to nginx, but more so to php-fpm that does the grunt work.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.