-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment: FreePBX on NGINX -- anybody can explore this, using flag 'pbx_try_nginx: True' [RENAMED TO... pbx_use_nginx: True] in /etc/iiab/local_vars.yml #2916
Conversation
The error arises from Line 63 of /var/www/html/freepbx/admin/libraries/BMO/Cron.class.php here: // If we're not root, we can only edit our own cron.
if (posix_geteuid() != 0) {
$userArray = posix_getpwuid(posix_geteuid());
if ($userArray['name'] != $user)
throw new \Exception("Trying to edit user $user, when I'm running as ".$userArray['name']); |
Trying to setup the cron jobs.. https://git.freepbx.org/projects/FREEPBX/repos/framework/browse/amp_conf/htdocs/admin/libraries/BMO/Cron.class.php#51-54 suggest that there can be an override https://git.freepbx.org/plugins/servlet/search?q=AMPASTERISKWEBUSER think if we define '$amp_conf['AMPASTERISKWEBUSER'] = www-data' in /etc/freepfx.conf we might be good to go? |
|
mental note grab |
Just occurred to me that what is passed with |
This current PR is being fresh-installed on 10.8.0.22 (191-u20-srv-pbx4) with the following last-minute line hacked into freepbx.yml, immediately after
|
Conclusion: this
|
Eureka the "Pre-Asterisk hooks" problem is finally solved:
Sorry the code yesterday led to confusion, and worse a day wasted. I (and likely others) were tripped up by the But all's well that ends well. |
[ CORRECTION: Aug 6/7 testing below was not complete 3-4 days ago -- clarification at the bottom of freepbx.yml here... ] https://github.com/iiab/iiab/blob/master/roles/pbx/tasks/freepbx.yml#L289-L300 Unfortunately however adding As I've confirmed on both:
If it helps, please feel free to log to either FreePBX page above, with the usual field operator's Admin password, to click around etc and verify what all works (and doesn't work!) regardless of the cron complaint during initial registration? Regrettably I do not know how to "nuke" the registration of FreePBX's Admin user — i.e. to retest this initial FreePBX Admin user registration registration process. Possibly the process is hard to reverse? In any case: for the moment testing this takes a lot of time (almost an hour to clone/build a new VM, fresh-installing IIAB with this PR #2916 each time if there's no better way ??) |
This is great, thanks @holta abd @jvonau I quickly checked 10.0.8.42 to see if freepbx is working fine. This is a good quick test to see if things are setup correctly:
I see an error during fwconsole reload. We may still have to tweak some permissions or configs to get things working, but great progress so far. |
I'd try setting '--user=' on the command line to 'install' and see how freepbx.conf gets populated. I ran across this post before, double check that we have the groups right. |
Any idea which if any of these ~30 FreePBX's
|
I'd try setting '--user=' on the command line to 'install' and see how freepbx.conf gets populated. I ran across this post before, double check that we have the groups right. |
10.8.0.42 = 194-deb11-srv-pbx5 is currently paused at the Ansible breakpoint right before freepbx.yml's I have to head out for the afternoon — but let me ask what Aside...I ran these 4 commands just to verify all's good with Asterisk:
|
Any real reason to alter the below stanza?
Looks like a normal system user now that can login and with the .pm2 directory now moved.
I would confirm that
Are running within the freepbx service from their new location. |
I finished the install on 10.8.0.42 with this Bit of poking and things look ok. Don't like /home/asterisk being around thou...
|
same issue as #2916 (comment) noted. |
Go though language selection and press apply see noted error #2916 (comment) The latest change to asterisk's home directory is confirmed to be working OK with apache without adding nginx into the mix? |
The goal is to remove eccentric/complex randomness from old blog posts like: Using these official instructions instead: In short, I commented out these 3 lines :
If there's another much better approach (that doesn't deviate too far from the official instructions!) that's also Ok. |
Thanks for doing this! Regardless where it leads us (: |
Yea revert that change as you are now introducing the use of /home/asterisk in place of /var/lib/asterisk which /var/lib/ is commonly used by system level components. The use of home to run services from is more homebrew'ish than doing what was done in the past without this change using apache why change that now? |
I don't doubt that. Some official documentation would be very useful. But Asterisk's requirement that user 'asterisk' have any home directory at all exists appears gratuitous. i.e. it's very likely this has no consequence, no matter what we set it too. So I've changed it back to |
ls /var/lib |
On Ubuntu Server 21.04 on RPi 4...just as IIAB install is beginning, there are 35 things in /var/lib :
On Ubuntu Server 20.04 VM after a basic IIAB with roles/pbx (Apache default) was installed using PR #2920, there are 41 things in /var/lib :
|
I'll note nginx php mysql... think those qualify as system level as delivered as apt. |
This is @jvonau and @lemueldsouza's work, posted for others to try. Building on:
Testing is ongoing. This is a work-in-progress.