apache, nginx mix

I have installed LAMP, and also ruby and nginx. Is it possible to have two web servers side by side serving different domains? How does passenger behaves overall? Since one will have passenger-install-apache2-module, and the other passenger-install-nginx-module…

thank you.

4 Replies

on the same port, no, on different ports yes, I have no idea how the ruby app will behave with two different servers working on it, mind if I ask why you want two web servers?

I have installed LAMP. Then, when I came to installing ruby through the linode library, and found out the set up instructions are for nginx. I figured since I have set up apache, I might as well utilize this set up. I am not that familiar with nginx, even though it might be a better option since it is lighter. Then, wondered if they could live side by side.

There are three ways to run two web servers on a single Linode.

1. Run them on different ports. For example, Apache will run on http://www.yourdomain.com/ (port 80 which is default), while nginx will run on http://www.yourdomain.com:81/ (port 81). Your users probably won't like having to type the port number.

2. Run them on different IP addresses. You can buy another IP address for $1/month.

3. Put nginx in front of Apache, and proxy the requests to Apache.

I went back to the library and I saw that Apache ruby set up is listed further down below.

I was just reading about using nginx and reverse proxy similar to your suggestion on number 3.

I am thinking of stopping apache2 and trying out nginx stand alone. I was comparing the instructions on installing ruby with passenger nginx to LEMP and web server nginx set up. Over at LEMP, the nginx from source instructions seems a bit different. Is there anything crucial over at LEMP or web server set up that I should add to ruby passenger nginx installation?

these arent listed on the ruby passenger nginx set up…

like third party modules

./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-httpsslmodule

make

make install

and it doesnt have user, group set up

adduser --system --no-create-home --disabled-login --disabled-password --group nginx

thank you

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct