I have mongodb installed on Windows in an ip address 10.21.10.11:27017
. When I am in the same network, I am able to connect to mongodb with the URL mongodb://10.21.10.11
. However, I would like to access it from outside. For this, I need to do reverse proxy on Apache. What is the correct command to redirect?
My attempts are like this
ProxyPass /MongoDB http://10.21.10.11:27017
ProxyPassReverse /MongoDB http://10.21.10.11:27017
But, it is not redirecting there.
I have also tried
ProxyPass /MongoDB mongodb://10.21.10.11:27017
ProxyPassReverse /MongoDB mongodb://10.21.10.11:27017
But it did not work. I have seen that a few people reported that it works well for nginx. Please post your answer, if anyone configured it correctly.