Metabase Docker not loading on /metabase β Apache serving Laravel instead
Hey everyone ![]()
Iβm running a Laravel app and Metabase (in Docker) on the same Google Compute Engine VM.
What I want:
My Laravel app β http://<VM-IP>/
Metabase β http://<VM-IP>/metabase
Metabase not exposed on port 3000
What I did so far:
I run Metabase in Docker:
sudo docker run -d -p 3000:3000 \
-e MB_SITE_URL="http://127.0.0.1/metabase" \
--name metabase metabase/metabase
Checked with:
curl http://127.0.0.1:3000
It returns Metabase HTML, so the container works.
Then I configured Apache with proxy:
/etc/apache2/sites-available/metabase.conf
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ProxyPass /metabase http://127.0.0.1:3000/
ProxyPassReverse /metabase http://127.0.0.1:3000/
ErrorLog ${APACHE_LOG_DIR}/metabase_error.log
CustomLog ${APACHE_LOG_DIR}/metabase_access.log combined
</VirtualHost>
Enabled modules and site:
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2ensite metabase.conf
sudo systemctl reload apache2
Problem:
http:/// β Laravel login page ![]()
curl http://127.0.0.1/metabase β Shows Metabase HTML ![]()
http://<VM-IP>/metabase β Laravel 404 β
So Apache still routes /metabase to Laravel instead of the proxy.
Question:
How can I properly configure Apache so that /metabase proxies to the Docker container β without exposing port 3000 publicly? I am trying to use the best practice to test something on gcp compute engine