LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-20-2012, 04:11 AM   #1
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Fedora, Ubuntu, Knoppix
Posts: 60

Rep: Reputation: 15
Question 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.
 
Old 02-20-2012, 05:25 AM   #2
eosbuddy
Member
 
Registered: Feb 2012
Location: India
Distribution: Ubuntu, Fedora, Gentoo, Mandrake, RedHat, CentOs
Posts: 30

Rep: Reputation: Disabled
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.

Last edited by eosbuddy; 02-20-2012 at 05:30 AM.
 
Old 02-20-2012, 05:29 AM   #3
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Fedora, Ubuntu, Knoppix
Posts: 60

Original Poster
Rep: Reputation: 15
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?
 
Old 02-20-2012, 05:38 AM   #4
eosbuddy
Member
 
Registered: Feb 2012
Location: India
Distribution: Ubuntu, Fedora, Gentoo, Mandrake, RedHat, CentOs
Posts: 30

Rep: Reputation: Disabled
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;
}

Last edited by eosbuddy; 02-20-2012 at 05:56 AM.
 
Old 02-20-2012, 05:59 AM   #5
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Fedora, Ubuntu, Knoppix
Posts: 60

Original Poster
Rep: Reputation: 15
Thanks!
I'll do just that.

By the way: do you know any nginx GUI for webmin?
 
Old 02-20-2012, 06:05 AM   #6
eosbuddy
Member
 
Registered: Feb 2012
Location: India
Distribution: Ubuntu, Fedora, Gentoo, Mandrake, RedHat, CentOs
Posts: 30

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

Not sure how it would be though.
 
Old 02-21-2012, 06:49 AM   #7
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Fedora, Ubuntu, Knoppix
Posts: 60

Original Poster
Rep: Reputation: 15
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?
 
Old 02-21-2012, 06:57 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
 
Old 02-21-2012, 07:20 AM   #9
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Fedora, Ubuntu, Knoppix
Posts: 60

Original Poster
Rep: Reputation: 15
Unhappy

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.

Last edited by aabfm; 02-21-2012 at 08:20 AM.
 
Old 02-21-2012, 10:01 AM   #10
eosbuddy
Member
 
Registered: Feb 2012
Location: India
Distribution: Ubuntu, Fedora, Gentoo, Mandrake, RedHat, CentOs
Posts: 30

Rep: Reputation: Disabled
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.

Last edited by eosbuddy; 02-21-2012 at 10:06 AM.
 
Old 02-21-2012, 10:06 AM   #11
aabfm
Member
 
Registered: Jan 2006
Location: Portugal
Distribution: Fedora, Ubuntu, Knoppix
Posts: 60

Original Poster
Rep: Reputation: 15
OK.
I'll give it a try.
As soon as I have some results I'll post them here.
Thanks.
 
Old 02-21-2012, 10:29 AM   #12
eosbuddy
Member
 
Registered: Feb 2012
Location: India
Distribution: Ubuntu, Fedora, Gentoo, Mandrake, RedHat, CentOs
Posts: 30

Rep: Reputation: Disabled
Sure ... good luck with your efforts and look forward to your success.
 
  


Reply

Tags
apache, nginx


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nginx + php-fpm and nginx modules fantasygoat Linux - Server 0 06-09-2011 12:21 PM
LXer: Nginx+Varnish compared to Nginx LXer Syndicated Linux News 0 04-27-2011 02:30 PM
Nginx experts help me-problem when using Nginx php-fpm !!! HuMan-BiEnG Linux - Server 2 04-17-2011 02:30 PM
NGINX with PHP-FPM vis NGINX with Spawn-FCGI WhisperiN Linux - Server 1 03-15-2011 06:39 PM
BigBlueButton, from http to https reverse proxy Steviepower Linux - Security 3 12-09-2010 07:58 AM


All times are GMT -5. The time now is 01:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration