Set up JupyterLab and OmniDB on the same server

Dear friends,

I am trying to set up JupyterLab together with a web GUI management tool for databases (OmniDB)

This would help me in my data science project to make it easier for me to have a unified workflow by having all the tools I need accessible in my browser (scraping data, inserting into mySQL databases and managing mySQL tables).

These are the steps I have taken to access my instance (following the Jupyter guide to securing notebook server):

  1. Set up EC2 instance,
  2. static IP,
  3. add DNS records,
  4. obtain LetsEncrypt certificate,
  5. redirected all HTTPS traffic to the port on which my JupyterLab instance is listening (port 8888)

sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8888

The reason to redirect is because I don’t wish to enter the port number in the URL.

I have now successfully setup JupyterLab and am able to access my instance via:

https my-domain.org

Now, I need to access OmniDB (a web GUI for managing databases) at the same domain, but listening on different port.

My intended outcome is to access https://my-domain.org/OmniDB and be able to access OmniDB, the UI for managing databases.

Here is my Apache2 conf file:

<VirtualHost 0.0.0.0:443>
	ServerName my-domain.org/omniDB
	ServerAlias www.my-domain.org/omniDB
	ServerAdmin [email protected]
	DocumentRoot /home/web/my-domain
	<Directory /home/web/my-domain/www>
		Options +FollowSymLinks +ExecCGI +Includes
		Require all granted
	</Directory>
	
	ErrorLog /home/web/my-domain/log/error.log
	CustomLog /home/web/my-domain/access.log combined
	
	SSLEngine On
	SSLCertificateFile /etc/letsencrypt/live/my-domain.org/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/jinlee.org/privkey.pem
	
	ProxyPass /omniDB https://my-domain:8889/omniDB
	ProxyPassReverse /omniDB https://my-domain:8889/omniDB
</VirtualHost>

I have Apache2 successfully running, but I am unable to access the OmniDB service from either
https my-domain.org:8889
or
https my-domain.org/OmniDB

However, I am able to access OmniDB if I stop Jupyer and configure OmniDB to listen on port 8888 via
https my-domain.org

I need to have both services running though. Appreciate if anyone can help me out… cheers