Reverse proxy and vhost config (updated with useful info lol)

Goal: External access to “/var/www/wiki” from “wiki.domain.com(clean subdomain without :port extension)

System:

  • Debian 11
  • apache2

Domain:

  • domain.com” is rooted at “/var/www/domain.com/html/index.html” on port 443
  • contents of /etc/apache2/sites-enabled is
    domain.com.conf domain.com-le-ssl.conf searxng.conf wiki.domain.com.conf

I am almost certain my issue is within vhost configuration, and I think the solution has to do with reverse proxy but I’m not even sure if I should be using domain.com-le-ssl.conf. If I am supposed to use it, do i disable and/or remove domain.com.conf and wiki.domain.com.conf ?

i dont know enough about any of this to be sure what im doing right and what im doing wrong. ive found a few threads (digitalocean gist.github/mgbckr linkedin johnwesthoff) with similar issues and solutions but all of those solutions are varying vhost configurations that i dont completely understand even after reading the docs for apache.
Very eager to use tiddlywiki but i cant justify it without external access on this host.Thank you

Solved?
there was certainly something awry in my /etc/apache2/sites-enabled & /etc/apache2/sites-available.
.
first i replaced their contents with

  • wiki.domain.com.conf
<VirtualHost *:443>
ServerName wiki.domain.com
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
  • www.domain.com.conf
<VirtualHost *:443>
ServerName www.domain.com
DocumentRoot /var/www/domain.com/html
</VirtualHost>
  • domain.com.conf
<VirtualHost *:443>
ServerName domain.com
DocumentRoot /var/www/domain.com/html
</VirtualHost>

then ran cerbot --apache for each of them and everything is running as it should be. So I didn’t do anything special other than figure out the bare minimum apache/vhost config for a server to do nothing but serve a tiddlywiki behind apache2. (credit to john cause i think his guide would have worked if i didnt have user error previously

the tiddlywiki seems unable to autosave atm though im not sure it has anything to do with this apache issue. we’ll see :blush:

You mentioned digitalocean. … So is this your provider? If so you should use there docs: How To Use Apache as a Reverse Proxy with mod_proxy on CentOS 7 | DigitalOcean … That’s what I found. … Instead of the described test-server you could try to use TW and connect it.

If possible let the provider do the SSL update handling with lets-encrypt

I don’t have an digitalocian account. So I have no idea how it works there.

Hey pmario thanks for the reply. No I host this system in my home lan. those links where digitalocean is referenced are just some of the similar problems/solutions i’ve found while trying to solve this.

missing this in vhost for autosave functionality