Discourse installeren samen met Apache websites

AI-generated summary

A user, blades, is seeking help with installing Discourse alongside existing Apache websites, after restoring a backup on a server where Apache was previously disabled. They encountered issues with Apache configuration, as Discourse redirected to an unrelated domain when Apache was enabled. Despite following tutorials, the setup failed. 2 neounix reassured that using Apache as a reverse proxy is possible and provided links to relevant guides. blades shared their Apache configuration, which uses a reverse proxy to localhost:8080, and later confirmed the issue was resolved, closing the topic 5 blades.

Hi to all,

I used to have a fully working discourse installation in a server.
Now I decided to restore my discourse backup at my apache web-server but it seems not possible.
I read and tried a lot of sollutions through the meta but nothing worked.
Does anybody have time to help. Thank you in advance.

What I have right now is a restored discourse installation with https enabled but the vhost config file or the apache config file are not setup correctly and it shows error, of course the discourse is not showing up. (I installed the discourse having disabled the apache2 service untill the installation was done).

*The installation is working fine as long the apache is disabled

Of course it is possible :slight_smile:

You can easily set up Apache2 as a reverse proxy in front of Discourse and there are many tutorials on meta which support this.

Here is one example here:

There are others as well, which can be found searching this site.

For example:

OBTW, a Google search turns up many hits on this topic.

You didn’t need to answer this, I already have explained I have followed a couple of tutorials without success.

I don’t know why but when apache service is started, visiting my discourse forum it redirects to a hvost I have for example takeiteasy.com but the domain for the forum is forum.example.com, they are not the same.

the discourse domain apache conf is

<VirtualHost *:80>
  ServerName forum.example.com
  ServerAlias www.forum.example.com

  <IfModule proxy_module>
    ProxyPreserveHost on
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
  </IfModule>
</VirtualHost>

if comeone can help

Topic can close, problem solved.