# Discourse with Apache, MySQL and PHP

**URL:** https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431
**Category:** Feature
**Created:** [June 15, 2019, 6:30am UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431 "2019-06-15T06:30:58Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![TomHsiung](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomhsiung/32/81033_2.png) [@TomHsiung](https://meta.discourse.org/u/TomHsiung)
#### Post date: [June 15, 2019, 6:30am UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/1 "2019-06-15T06:30:58Z")

</div>

Hello,

If users with Apache, MySQL, and PHP can install Discourse, I think the market capture of Discourse would increase greatly. Thank you.

Tom

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [June 15, 2019, 6:47am UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/2 "2019-06-15T06:47:56Z")

</div>

Do users and community managers _really_ care what something is written in?

I recommend reading [Why Ruby?](https://blog.codinghorror.com/why-ruby/)

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [June 15, 2019, 6:53am UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/3 "2019-06-15T06:53:00Z")

</div>

```
 * and the references of that post

```

---

<div class="post-metadata">

### Author: ![TomHsiung](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomhsiung/32/81033_2.png) [@TomHsiung](https://meta.discourse.org/u/TomHsiung)
#### Post date: [June 15, 2019, 7:06am UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/4 "2019-06-15T07:06:12Z")

</div>

Many website administrators need LAMP to build their business websites in addition to Discourse. However, if they deploy Discourse on their LAMP server, the Apache had to use a different port. Some kind of trade off between Apache and Discourse.

But, I do really think that Discourse is a great work!

---

<div class="post-metadata">

### Author: ![TheBestPessimist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebestpessimist/32/247704_2.png) [@TheBestPessimist](https://meta.discourse.org/u/TheBestPessimist)
#### Post date: [June 15, 2019, 7:44am UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/5 "2019-06-15T07:44:30Z")

</div>

Well if apache is anything like nginx, i would expect it to be possible to forward different connections/subdomains/hosts to different local ports. discourse listens on one of those ports (or on a unix socket) and the php website listens on another.

_i have the feeling we’re going off the original post’s subject._

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 15, 2019, 11:41am UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/6 "2019-06-15T11:41:38Z")

</div>

I don’t know whether that is true, but I do know that will never happen.

What most people do is to run discourse on another server.

---

<div class="post-metadata">

### Author: ![TomHsiung](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomhsiung/32/81033_2.png) [@TomHsiung](https://meta.discourse.org/u/TomHsiung)
#### Post date: [June 15, 2019, 4:48pm UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/7 "2019-06-15T16:48:34Z")

</div>

If two servers mean two public IP addresses. But many small home users only has one public IP address.

This means they must use iptables rules to set up a DNAT gateway.

Tom

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [June 15, 2019, 5:09pm UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/8 "2019-06-15T17:09:46Z")

</div>

> [@TomHsiung](#):
>
> But many small home users only has one public IP address.

Most admins surely sensibly host in the cloud? Just guessing but suspect that’s a cheaper approach than having business class broadband at home. For the price premium of that you surely could instead afford several VPS servers in the cloud with superior internet bandwidth?

---

<div class="post-metadata">

### Author: ![TomHsiung](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomhsiung/32/81033_2.png) [@TomHsiung](https://meta.discourse.org/u/TomHsiung)
#### Post date: [June 15, 2019, 5:32pm UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/9 "2019-06-15T17:32:47Z")

</div>

It’s a trade off, man.

I have many data like movies files to stream for my home (via Plex). I have my home server with big size hard drives so that I could backup many of my documents and data there.

For example, you could upload public data to the home server and everyone in the private network could download them if permitted. I have my home private network of 1000 Mbps bandwidth, really fast. But with a cloud VPS, this is not a good plan. The bandwidth between your client and the cloud VPS server might be 100 Mbps or so, but it is unlike that it could be 1000 Mbps.

The cloud computer service has serious disk size limit for above intentions.

Actually, I have my cloud VPS server but I only use it to establish the IPsec connections.

Tom

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [June 15, 2019, 5:38pm UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/10 "2019-06-15T17:38:39Z")

</div>

But you don’t need 100’s of Gigs of storage for small to medium sized communities?

---

<div class="post-metadata">

### Author: ![chiucs123](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chiucs123/32/542507_2.png) [@chiucs123](https://meta.discourse.org/u/chiucs123)
#### Post date: [February 8, 2026, 2:24pm UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/11 "2026-02-08T14:24:17Z")

</div>

Just happened to come across this post and was thinking to drop my thoughts here as well.

Although web development always has a sentiment for certain newer language is _the_ future, LAMP has always been the fundamental components for hosting a website, especially for small businesses or organization - the same target audience who would need discourse to grow their communities, and they wouldn’t like the idea having to setup something completely separate from their infrastructure, and we shouldn’t be the ones to judge how they plan to build their infrastructure. There’s always valid reasons for people needing Discourse on LAMP, be as particular as the case may be.

As long as we’re considering from a software development point of view, adding a variant simply means effort and market share, it does not always have to be a replacement for the other language.

Having that said though, there are valid technical considerations regarding the use of LAMP given Discourse has quite a few features that may make use of real-time processing that requires a daemon/runtime to be always there in-memory, while Apache is just fundamentally build different to be more ad-hoc rather than being always there. Some adjustments or mechanisms might work on a completely different foundation to achieve the same user experience.

---

<div class="post-metadata">

### Author: ![elmuerte](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elmuerte/32/456517_2.png) [@elmuerte](https://meta.discourse.org/u/elmuerte)
#### Post date: [February 8, 2026, 6:29pm UTC](https://meta.discourse.org/t/discourse-with-apache-mysql-and-php/120431/12 "2026-02-08T18:29:57Z")

</div>

Maybe a bit blunt, but then running Discourse isn’t for them. If they can’t put in the effort to run it themselves, then they should use the hosted options.

Running Discourse behind an Apache server (which also hosts PHP applications with MySQL) isn’t impossible, or incredibly difficult. You “only” need to be able to run docker contains. You can either use http or unix socket to proxy the Apache traffic to Discourse’s nginx. All this is easily possible on a $10/month VPS depending on the traffic.
