# 403 forbidden after installation

**URL:** https://meta.discourse.org/t/403-forbidden-after-installation/27028
**Category:** Self-hosting
**Tags:** docker
**Created:** [2015年三月31日 14:45 UTC](https://meta.discourse.org/t/403-forbidden-after-installation/27028 "2015-03-31T14:45:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Elano](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@Elano](https://meta.discourse.org/u/Elano)
#### Post date: [2015年三月31日 14:45 UTC](https://meta.discourse.org/t/403-forbidden-after-installation/27028/1 "2015-03-31T14:45:49Z")

</div>

Hello!

I’m a newbie in this kind of installation and I saw this forum “Discourse” like a month ago and today I tried to install it on my website but something went wrong… ^^’

I use Debian so I followed this [Discourse on Debian Wheezy via Docker – Jan-Philip Gehrcke, PhD](http://gehrcke.de/2014/07/discourse-on-debian-wheezy-via-docker/) tutorial for my installation.

I have my /var/discourse/shared/standalone file, but on my website, it doesn’t work… On my FTP, my file [forum.gameguides.fr](http://forum.gameguides.fr) is empty ='(

On Putty I have this :

> [193] 31 Mar 14:36:33.763 \* Saving the final RDB snapshot before exiting.  
> 2015-03-31 14:36:33 UTC [74-2] LOG: database system is shut down  
> [193] 31 Mar 14:36:33.800 \* DB saved on disk  
> [193] 31 Mar 14:36:33.802 # Redis is now ready to exit, bye bye…  
> cf42aa40d0ef575fb3310414cc068ee85e4af0d69377ad0e9e6021ea7f5c3277  
> 73b294b37be7316f11789214c6cc2469d0692feb8b351ea29da2d3088e75dca4  
> Removing old container
> 
> - /usr/bin/docker rm app  
> app

> - /usr/bin/docker run -d --restart=always -e LANG=en\_US.UTF-8 -e RAILS\_ENV=production -e UNICORN\_WORKERS=2 -e UNICORN\_SIDEKIQS=1 -e RUBY\_GC\_MALLOC\_LIMIT=40000000 -e RUBY\_HEAP\_MIN\_SLOTS=800000 -e DISCOURSE\_DB\_SOCKET=/var/run/postgresql -e DISCOURSE\_DB\_HOST= -e DISCOURSE\_DB\_PORT= -e HOME=/root -e DISCOURSE\_DEVELOPER\_EMAILS=contact.aion@_**. -e DISCOURSE\_HOSTNAME=[forum.gameguides.fr](http://forum.gameguides.fr) -e DISCOURSE\_SMTP\_ADDRESS=smtp.**_ **.** -e DISCOURSE\_SMTP\_PORT=587 -e DISCOURSE\_SMTP\_USER\_NAME=contact.aion@ **. -e DISCOURSE\_SMTP\_PASSWORD=** \*\*\* -h Gameguides.fr-app -e DOCKER\_HOST\_IP=172.17.42.1 --name app -t -p 127.0.0.1:20080:80 -p 2222:22 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log local\_discourse/app /sbin/boot  
> 0ff0e1fb83e97e63463e569a3a514542dc1320f30d3a721bf9da9d57745e5b68

If someone can help me it will be awsome ^^’

Greetings,  
Elano.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [2015年三月31日 18:07 UTC](https://meta.discourse.org/t/403-forbidden-after-installation/27028/2 "2015-03-31T18:07:40Z")

</div>

That “Forbidden” page is served up by an Apache webserver.

Only one application at a time can listen on any given socket. The first server that starts will claim the HTTP socket for itself, preventing the other server from accepting any connections. You can run Discourse alongside Apache, but it requires a specific setup:

- Apache needs to run with `mpm_event`, `mod_proxy`, `mod_proxy_http` and probably `mod_proxy_balancer`.
- You must modify Discourse’s configuration: disable SSL support and expose `"127.0.0.1:4000:80"`.
- Change your Apache config to proxy requests for `forum.gameguides.fr` to Discourse at `localhost:4000`.

You can find further info and examples here on meta. Some Apache config samples are [here](https://meta.discourse.org/t/run-discourse-with-or-alongside-existing-apache-sites/19514/11) and [here](https://meta.discourse.org/t/discourse-with-php-main-page/23830/8).

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015年三月31日 18:52 UTC](https://meta.discourse.org/t/403-forbidden-after-installation/27028/3 "2015-03-31T18:52:07Z")

</div>

Or, if @Elano would prefer nginx to be the front proxy, there are complete instructions here:

> [@Run other websites on the same machine as Discourse](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247):
>
> @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…

No modules/plugins are required, and your Discourse install will not be exposed on a side port.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [2015年三月31日 19:35 UTC](https://meta.discourse.org/t/403-forbidden-after-installation/27028/4 "2015-03-31T19:35:56Z")

</div>

You say that as if nginx’s proxy code wasn’t wrapped into modules as well… the only difference is that most distros have decided to build nginx with all modules enabled and Apache with most modules built as external libs. 🙂

Oh, and Apache can proxy to unix sockets as of version 2.4.7, too. 😃

---

<div class="post-metadata">

### Author: ![Elano](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@Elano](https://meta.discourse.org/u/Elano)
#### Post date: [2015年三月31日 19:48 UTC](https://meta.discourse.org/t/403-forbidden-after-installation/27028/5 "2015-03-31T19:48:10Z")

</div>

Hi ^^

Thanks for your answers =) I think I’ll try the Apache version ^^

Greetings,  
Elano.
