Enable PHP on BigBlueButton .71 Server
It’s been asked a couple times how to run PHP on a BigBlueButton (BBB) server. The following has been tested on the .71 BBB virtual image.
BBB uses nginx to route incoming web traffic red5, tomcat and some other stuff. Because of that, you can’t use any urls that start with /bigbluebutton, /deskshare, /client, /open/, /close, /idle/, /send/
. But we can install php and enable it for other urls.
First we need to install php5-fpm. It’s not included in the ubuntu 10.04 php packages, so we’ll use a PPA for it.
sudo apt-get install python-software-properties sudo add-apt-repository ppa:brianmercer/php sudo apt-get update sudo apt-get install php5-fpm
Open /etc/php5/fpm/php5-fpm.conf
with your favorite editor and find the line that starts with listen
, and edit to this:
listen = /var/run/php5-fpm.socket
Now we need to tweak the nginx site config file vim /etc/nginx/sites-enabled/bigbluebutton
. At the end – but before the last } – we need to add the following block of code:
location ~ .php$ { fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass unix:/var/run/php5-fpm.socket; fastcgi_param SCRIPT_FILENAME /var/www/bigbluebutton-default$fastcgi_script_name; include /etc/nginx/fastcgi_params; fastcgi_index index.php; }
This is optional, but if you may want to find the block that starts with location / {
and add index.php
to the list of indexes. This will allow you to use index.php if you use a url to a directory with no explicit filename.
Now restart php5-fpm:
sudo /etc/init.d/php5-fpm restart
And restart nginx:
sudo /etc/init.d/nginx restart
Let’s test it out. Create a file /var/www/bigbluebutton-default/test.php
with this:
<?php phpinfo(); ?>
Then test it by going to http://<ip>/test.php.
Now you can install any other php packages you may need for whatever you want to do – like php5-mysql…
You’ll need to run /etc/init.d/php5-fpm restart
after installing php packages.
All professionalism aside, I just want to say, “I love you.”. This is JUST what I needed. Well done. =)
i have installed the apache2 and changed nginx’s ip address and now both are working, but when i clicking on join (a meeting) in http://127.0.0.1/bigbluebutton/demo1.php (running with apache2) i seeing this error:
Unable to join the meeting. Please check the url of the bigbluebutton server AND check to see if the bigbluebutton server is running.
please help me 😦
This is exactly what I needed! I needed to know which directory to use without actually breaking the original configuration of bigbluebutton! Like Spencer, thank you!
you must get the security salt code with:
bbb-conf –salt
and change the “$salt” to new security code in bbb-api-conf.php
and url to “http://{ip address}/bigbluebutton”
So I tried testing it out and it gave me a fastcgi_script error: Unknown script. Any ideas?
Way cool! Some very valid points! I appreciate you writing this article plus the rest of the website is
really good.