LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   LAMP server + nginx + bigbluebutton (http://www.linuxquestions.org/questions/linux-server-73/lamp-server-nginx-bigbluebutton-930302/)

aabfm 02-20-2012 05:11 AM

LAMP server + nginx + bigbluebutton
 
Hi,
I installed a LAMP server with Webmin. Later on I installed BigBlueButton (BBB) on it and then Apache stopped working and now I have nginx instead. But that's not the problem, since I can still see Webmin over the network on another computer.
Although BBB is at /var/www/bigbluebottle and /var/www/bigbluebottle-default I'd like to have the root folder back as /var/www so I can have a previous webpage before reaching BBB.
Can anyone help me?
Thanks in advance.

eosbuddy 02-20-2012 06:25 AM

Technically nginx likes to run on port 80 ... you can change this to another port by editing /etc/nginx/nginx.conf.
However, this will break bigbluebutton ... so my recommendation is that you move apache to another port (I am not familiar with webmin; but I am sure that you will need to change port here too and also under your virtual domains within the /etc/apache2/sites-enabled folder. You change apache ports by editing the file /etc/apache2/ports.conf).

You will also need to forward all requests for your sites enabled appropriately (by adding your virtualdomains into the /etc/nginx/sites-enabled) like this:

server {
listen 80;
server_name myvdomain.com;
server_name www.myvdomain.com;

location / {
proxy_pass http://127.0.0.1:8999/;
}
}

where 8999 is the port on which I've configured apache.

Hope this helps.

aabfm 02-20-2012 06:29 AM

During BBB installation apache was put aside and now nginx 'rules'.

So far there's nothing but BBB on nginx, thus, is there any possibility of nginx to direct all the traffic to a "default" website?
If so how can I edit the conf files to prevent this?

eosbuddy 02-20-2012 06:38 AM

My suggestion would be to create a default website (based on domain name) in apache and redirect requests from nginx to that. You can then restrict ip based access to specific source ips (since bbb comes up on your ip address). I believe this is the way it was intended to be and also this will be the way in which you will have minimum amount of edits (you won't need to touch the bbb conf files at all).

You can restrict access using this pragma within your /etc/nginx/sites-enabled/bigbluebutton file (please not the "allow <ip>" and "deny all" directives):

# BigBlueButton landing page.
location / {
root /var/www/bigbluebutton-default;
index index.html index.htm;
allow 192.168.0.0/24;
allow 123.456.78.9;
deny all;
#allow all;
}

aabfm 02-20-2012 06:59 AM

Thanks!
I'll do just that.

By the way: do you know any nginx GUI for webmin?

eosbuddy 02-20-2012 07:05 AM

There seems to be a module over at github: https://github.com/vixh/nginx-webmin

Not sure how it would be though.

aabfm 02-21-2012 07:49 AM

According to your yesterday post I need to install apache, right?
But won't it be listen to port 80 as well?

I've already tried to change in /etc/nginx/sites-available/bigbluebutton file the port, but errors came up when trying to join a session.

What if I install apache, put it to listen port 82 (for instance) and set something to route all the traffic except one domain (to be bought) to it (i.e. 2 or 3 domains and subdomains), and this domain-to-be requests to forward them to nginx? Is this possible? If so, how can I do it?

acid_kewpie 02-21-2012 07:57 AM

nginx is a reverse proxy, so apache should be behind it in it's classical usage. all domains to go the nginx instance and that then directs them to apache or whervever based on http host headers etc. You can't specify port numbers in DNS records, it doesn't make sense.

aabfm 02-21-2012 08:20 AM

Humm....
This is getting too far beyond my knowledge...

Basically what I'm trying to do is to have this server responding with a simple php webpage, and ONLY if adding something to the address (it can be whatever you may think of, such as a different port, a sub-folder, you name it) just THEN the BBB should answer to the request.

eosbuddy 02-21-2012 11:01 AM

Yes you will need to install apache on the server (it's not advisable as I had mentioned earlier, to change the nginx port - as @acid_kewpie mentioned, it is foremost a reverse proxy; in addition, the bbb configurations break, as you rightly pointed out).

(internet) -> (nginx) -> (apache)

nginx should sit between your public-domain website (served by apache) and the world. When the world tries to access your ip (which has bbb webinterface available) on the browser, it should be denied for all but the sources you choose to open it up for. Normally the big blue button has apis available for third party systems (like moodle and drupal) that would sit on your apache served pages. The ips on which these sites live will be able to access your bbb installation too.

You could, alternatively have a bbb installation sitting all alone on your private ip if you will (in which case, you can port forward specific ips to the service through your gateway or load balancer).

I've mentioned earlier, I believe, that you will need to change the port on which apache runs by editing the ports.conf file within /etc/apache2/ folder (just two sets of lines) like these:

NameVirtualHost *:8998
Listen 8998



Hope this helps.

aabfm 02-21-2012 11:06 AM

OK.
I'll give it a try.
As soon as I have some results I'll post them here.
Thanks.

eosbuddy 02-21-2012 11:29 AM

Sure ... good luck with your efforts and look forward to your success.


All times are GMT -5. The time now is 04:09 AM.