how to migrate to docker from apache web server

Posted June 5, 2021 828 views
DockerUbuntu 20.04DigitalOcean App Platform

As i was following this tutorial . My VPS is now set with apache web server running (BIG thank you for that). and now I wanted to make my website (index.html with some css) dockerized. how do i migrate my apache setup on my VPS with ssl to run my docker app instead?

1 comment
  • i have install docker on my vps and dockerized my app (haven’t run it tho), i am just confused now on what todo next.
    Should I stop apache server and run nginx instead?

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 there @amammustofa,

Yes, one way would be to stop Apache and install Nginx. Then you could follow the steps here on how to use Nginx as a reverse proxy with Docker:

Alternatively, if you prefer using Apache, you could also use it as a reverse proxy. To do so you could follow the steps here:

Let me know how it goes!

by Mateusz Papiernik
In this tutorial, you will set up Apache as a reverse proxy using the `mod_proxy` extension to redirect incoming connections to underlying application server(s) running on the same network. There are instructions on setting up a simple web app using the Flask framework to show how Apache interacts with the real application hidden behind it, but you can also follow this tutorial using your existing application server, if you have one.
  • It works!!, thank you now the server is running with nginx. and i think the reverse proxy is the key to make it work.

    one question tho, will the nginx conf inside docker will override config that in host machine?