Multiple nginx in one server?

Hello,

Can I run multiple nginx in a server? One server wll be used for mp4
streaming and the other one will be used for web server. Is it a good
idea
to use multiple nginx in a server? Thanks.

Max

Sure you can. But I wouldn’t advise it. nginx is extremely efficient.
You should be able to handle both needs using the same instance.

Yes
for example

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

}

server {
listen 80;
server_name stream.domain.com;

}

2010/1/22 Max [email protected]

Yes, I was asking about multiple nginx instances :-). Thanks anyway.

I will think about it. Since I just afraid if there is any problem for
the
streaming server, my web server will still running if I got 2 nginx
instances :-).

Max

that’s one nginx instance with multiple server blocks. :stuck_out_tongue:

sounded to me like the OP was asking about multiple nginx instances.

Max wrote:

Yes, I was asking about multiple nginx instances :-). Thanks anyway.

I will think about it. Since I just afraid if there is any problem for
the streaming server, my web server will still running if I got 2
nginx instances :-).
If you really did want to have two servers running, then you would need
separate IP addresses on which to bind, or have them bound to different
ports. You’d also need to specify both the IP addresses and ports in
the listen directive.

You’re probably better running just one instance of Nginx and multiple
‘server’ definitions though.

Marcus.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs