Apache Reverse Proxy - Use root address


I recently setup a Joplin server on Ubuntu. I am fairly new to reverse proxy setup. But I'd like to have https://joplin.MYDOMAIN.COM be the base URL for the joplin app. Right now due to my limited experience with apache proxy reverse. I have to set up my app base as https://joplin.MYDOMAIN.COM/joplin, thus I have to login at https://joplin.MYDOMAIN.COM/joplin/login

Here is the rule that is located in " /etc/apache2/sites-enabled/000-default-le-ssl.conf"

ProxyPreserveHost On
ProxyPass "/joplin" http://localhost:22300
ProxyPassReverse "/joplin" http://localhost:22300

How can I set it up to use https://jopin.MYDOMAIN.COM instead? I tried replacing "/joplin" in the rule to "/" but that didn't work out for me.

Thank you!

Why don't you use inline code or a code block? (New forum users can't post links, but your links are not valid anyway, thus code blocks are a good option.)

@tessus Thanks for the tip! I made the changes.

That should do it though.

What were the error messages? In the Apache log and in the Joplin log?

Did you set the APP_BASE_URL in the .env file?

@netdawg any update?

I'd been experimenting with caddy as a reverse proxy for Joplin Server the other day. It was as simple as caddy reverse-proxy --from domain.example.com --to localhost:22300, I'd highly give it a recommendation, it even handles it's own HTTPS certificates! It also has a pretty simplified configuration format compared to Apache, but I haven't even needed text config thus far.

(Caddy's what I'm using in the experimental server snap, it's really a beast!)

Besides this, what I did notice is that you shouldn't be setting the port address in APP_BASE_URL if you're not on localhost, so APP_BASE_URL=localhost:23000 is fine, but APP_BASE_URL=mydomain.com:80 is straight up broken.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.