hi @Falco, thank you for sharing such a wonderful piece of information.
I got my first own forum running!!! Thanks to you!!!
Is it possible for me to access the forum with the machine local ip address? When my discourse hostname is already set to a domain (got it from freenom).
When i tried to access the forum with the machine’s ip address, the page always stuck at loading and never managed to load.
I got a use case where my client machine is connected to some VPN and have no access to internet. The only way for me to access the forum is through the local network ip address.
You might find this discussion useful. You are asking for support on a very non-standard install:
Thanks @merefield.
I find when using curl on the server’s local ip address it returns the page but not with a browser.
It’s got to do with the settings on the browser?
You need to access the app via domain name for several reasons. IP access is not supported afaik
Got it! Thanks on the confirmation.
Maybe hardcode that IP in your local hosts file?
Thanks Falco! I will check that out.
I tried hardcode the IP in my client’s hosts file, and the browser always redirect me to the external connection.
Is it possible to provide more than one domain name to the DISCOURSE_HOSTNAME
?
Do i need to set DISCOURSE_FORCE_HTTPS:
to false to allow local connection? I got this from one of your article.
I am trying to install Discourse on my Raspberry Pi 4 using Dietpi OS and some apps working with Nginx like Nextcloud. I am trying to use Cloudflared service as a tunnel but after the Discourse installation is complete I can’t access Discourse site and i got 502 bad gateway error.
What kind of customization is required on Nginx? Which port should we use?
I applied this guide but without success
@pfaffman edited this heavily 2022.02.24. Blame me if it’s broken. If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container. NOTE: This is for advanced admins This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working. You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will…
My guide assumes that Discourse is the only app on the Pi, and then runs the tunnel exposing the port 80 that is assigned to the Discourse container.
Running multiple apps that share a reverse proxy, while possible, is a more advanced setup and out of the scope of this guide.
I got this working by setting DISCOURSE_BACKUP_HOSTNAME to machinename.local and DISCOURSE_FORCE_HTTPS to false. Now i can access with my domain name and local network domain name.
Thanks @merefield. Sure!
There is one problem when using a backup hostname, the images doesn’t display properly.
If the post’s images created with main hostname and when access with the backup hostname, the images will be missing. This also happens in vice-versa.
What happens when you rebake a Post? (Rebuild HTML)
Perhaps you will need to stick to one access address.
Yeah, Rebuild HTML works. But the vpn access is broken because it depends on the local address (backup hostname).
i guess there is no solution to this…
Just to add a voice and to agree with @sam, we’ve already had some switcheroos with our domains and relative URLs is most certainly needed.
Will this work on an armv7l?
No it won’t. I did try, but there are some missing packages on the 32 bit ARM debian repositories that made it a no go.
The demo site link seems dead