How do I use meteorup and apache 2 in the same server ?

Posted June 11, 2016 2.2k views

So I have meteor app already up and running. Now im trying to set apache in the same server.

apache2: Could not reliably determine the server’s fully qualified domain name, using Set the ‘ServerName’ directive globally to suppress this message
(98)Address already in use: AH00072: makesock: could not bind to address [::]:80
(98)Address already in use: AH00072: make
sock: could not bind to address
no listening sockets available, shutting down

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0* LISTEN 873/sshd

tcp 0 0* LISTEN 11369/docker-proxy
tcp 0 0* LISTEN 13396/mysqld

tcp6 0 0 :::80 :::* LISTEN 11825/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 873/sshd

This is my plunt, docker-proxy is running in port 80 so, apache couldnt start, what could be the preferable solution ? Should I change the port of apache server or there are better ways.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hey @jyotichhetri01 -

It’s hard to say if this will help with your specific Docker/Meteor setup, but a common solution to running Meteor and Apache on the same droplet is to set up Apache as a reverse proxy.

Basically apache handles all incoming requests coming in to port 80, and forwards certain ones along to Meteor, which is listening on a different port.

Take a look at this Tutorial: How to use Apache as a reverse proxy using mod_proxy extension

by O.S. Tezer
In this DigitalOcean article, we are going to see set up Apache on Ubuntu 13 and use it as a reverse-proxy to welcome incoming connections and redirect them to application server(s) running on the same network. For this purpose, we are going to use and work with the mod_proxy extension and several other related Apache modules.