Question

several servers side by side

Posted January 13, 2021 328 views
Arch Linux

Hey there,

I am new to server management. I just configured a ubuntu server that will essentially be destined to personal and family usage. I have installed - so far - a filesharing system (nextcloud) and RStudio Server with an Apache Server. Both work fine.

Now, I would like to install in addition to the previous two apps a sharelatex server version. But this appears to require nginx. I have been trying for a while, but have not been able to avoid conflict with the prexisting installation.

any hints or guides you can point me to?

thanks

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

Hi! It’s perfectly possible to have both apache and nginx running but you will have to make some custom configuration choices.

The default HTTP and HTTPS ports are 80 and 443, respectively and only one application can bind to a port at a time - eg, with Apache running, it is probably bound to port 80 or 443 (for https). When you try to install nginx, it will also try to bind to those same ports and thats where you might encounter failures.

Here are a couple articles I found that might help shed some light on how to achieve your goals:

https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-18-04-server

I realize the above is for running a reverse proxy but the introduction does a better job of explaining than I could about the ports AND I’m hoping that skimming through that tutorial might help you in general seeing another example with apache and nginx both in use on the same Droplet.

https://hostadvice.com/how-to/how-to-configure-nginx-and-apache-together-in-ubuntu/

This is a simpler, more general document on installing both Apache and nginx which might yield some clues.

If I’m guessing incorrectly as to the nature of the conflict, please share more details about the specific steps and failure point so we can assist you better.

Good luck!

by Jesin A
In this tutorial you'll configure Nginx as both a web server and as a reverse proxy for Apache to host four domains on a single server.