Installing Discourse Forum on Virtualmin

SYSTEM INFORMATION
OS type and version REQUIRED
Webmin version REQUIRED
Virtualmin version REQUIRED
Related packages SUGGESTED

how we can install the discourse on the current install

I am hoping to get some more information how to install on virtual where other websites are running

It’s no different in Virtualmin (vs virtual hosting Discourse behind Apache on a system without Virtualmin). You’d proxy to the Docker-contained server running it.

This is a reasonable discussion on the topic (be careful if doing additional searches, the top result when searching for this is an insane guide that proxies through both Apache and HAProxy, which is a ridiculous thing to do):

nginx is pretty similar, if you’re using it. I’m sure there’s docs for that, too. But, as with Apache, if you see a crazy bunch of stuff in the mix, it’s probably wrong. This is not complicated and doesn’t need a bunch of extra software! Apache (or nginx) can proxy to a Docker container very easily with no additional stuff! Anything that suggests nginx+Apache is also crazy and senselessly complicated. Just Apache and mod_proxy will do the thing, assuming Docker is configured to expose the app on a local file socket (a local port would also work, but on a shared virtual hosting system, file sockets are safer, because a file, or rather the directory the file is in, can be owned by the user that owns the app).

I’ve discussed this in the past, as well. But, the most important thing is:

ProxyPass / unix:/var/discourse/shared/socket-only/nginx.http.sock|http://localhost/
ProxyPassReverse  / unix:/var/discourse/shared/socket-only/nginx.http.sock|http://localhost/

Note the socket can be wherever you put the Discourse directory, including in a domain owner home directory. This is just the path you’d use if installing Discourse exactly according to the docs, and then changed Docker to listen on a socket rather than directly on an IP and port 80/443 (which can’t happen on your Virtualmin system because Apache or nginx is already there).

1 Like

And, as always, if you want to use Let’s Encrypt in Virtualmin or via certbot using web validation, you’d also need to exclude the .well-known path, and let it be served from the file system. Again, this is always true, nothing special about Discourse or Virtualmin being involved.