0

I'm trying to do a workaround.. on the server of my client a service with an apache is already running, now i'm trying to add a subdomain to my service which includes a nginx running in docker. My question: how can I add a subdomain to the apache which points to the nginx running in docker?

sounds as a bad solution but its to much effort to put the services together, what do you think? (osTicket is already running behind the apache and I want to install bitwarden - bitwarden.com)

Thank you for your help!

paolo
  • 1
  • 1
  • 1
    Welcome to StackOverflow - your question can probably be answered in a lot of ways. What have you tried so far? How are you exposing nginx from docker? Perhaps [this thread](https://serverfault.com/questions/884862/apache-reverse-proxy-to-docker-container) would be of help, e.g. does it matter what Apache is proxying for in your container (Nginx or a plain web application)? – Jeppe Mar 20 '20 at 21:43

1 Answers1

1

Architecturally, this is completely back to front. While Apache is quite capable of runing as a proxy, it is a complex and heavy bit of software - putting it in front of a lightweight webserver is putting the cart in front of the horse.

You've not said what you are trying to achieve: do you only have a single IP address? Do you NEED them to appear under the same vhost name?

You could put both behind a proxy - nginx or varnish being obvious candidates.

OSTicket is a PHP/MySQL application - it will run nginx+php-fpm just as well as on Apache and mod_php. However bitwarden itself is a standalone webserver - why are you trying to add another server into the mix?

symcbean
  • 47,736
  • 6
  • 59
  • 94
  • Yes, I think so too but osticket is already running with apache and I don't want to change his setup too much.. I want to achieve that I have two subdomains (bitwarden.domain.com and ticket.domain.com). I would like to define the subdomains with the apache but as i didn't work with apache before I don't know where to start.. – paolo Mar 20 '20 at 22:42
  • 3 questions, half an answer. hmmm. – symcbean Mar 21 '20 at 09:13