Aravind.HU
Aravind.HU

Reputation: 9472

Running Docker and Jekyll together in a same ec2 instance

I have an application called discourse running in my ec2 instance . Its using Docker to serve http requests .

Every thing is working fine with discourse . Now I want to host my jekyll blog in the same server .

I am able to generate a jekyll site and also I am able to serve pages but the problem is in pointing DNS records .

my discourse site works perfectly with out any hurdles but my jekyll site requires port number to load .

I mean, my blog wont load with out port number in the domain name .

like http://domain.com:4000

How can I run both these application servers to run on port 80 or how to serve requests from port 80 as well as 4000 for any requests .

Please note that I am not in a position to use apache mod_proxy to proxy the requests .

Please suggest a feasible solution . To handle this situation .

Below is my environment details : -

OS : - Ubuntu 13.10 Ruby version : - 2.0.0

Thanks in advance .

Upvotes: 1

Views: 261

Answers (1)

jpetazzo
jpetazzo

Reputation: 15501

The easiest solution is to run each app on a different port (e.g. 4000 and 5000), then use a reverse proxy running on port 80 to map different virtual hosts to each application.

Here is a fairly detailed example explaining how to do that with Nginx:

http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.html

Out of curiosity, why can't you use mod_proxy in that scenario?

Upvotes: 1

Related Questions