# Help configuring Tryton behind Apache reverse proxy

**URL:** <https://discuss.tryton.org/t/help-configuring-tryton-behind-apache-reverse-proxy/3032>\
**Category:** System Administrator\
**Created:** [July 16, 2020, 2:17am UTC](https://discuss.tryton.org/t/help-configuring-tryton-behind-apache-reverse-proxy/3032 "2020-07-16T02:17:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlostryton](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/carlostryton/32/978_2.png) [@carlostryton](https://discuss.tryton.org/u/carlostryton)\
**Post date:** [July 16, 2020, 2:17am UTC](https://discuss.tryton.org/t/help-configuring-tryton-behind-apache-reverse-proxy/3032/1 "2020-07-16T02:17:07Z")

</div>

Hi, I was playing around with GNU Health 3.6.4 version which comes with tryton 5.0.23 and werkzeug installed in a backend server (Ubuntu 20.04 LTS). I was able to install it with SAO 5.6.  
In the main server I’ve installed apache2 and configured it with mod\_proxy and related modules, the main configuration is similar to:

```
<VirtualHost *:80>
...
ProxyPass / http://192.168.10.44:8000/
ProxyPassReverse / http://192.168.10.44:8000/
...
</VirtualHost>

```

When I access from outside the intranet via web (let’s suppose the next URL: [https://gnuhealth.domain.com](https://gnuhealth.domain.com)), SAO loads correctly showing credentials form for database and user. I was able to login, only one error is prompted: FORBIDDEN.

However that’s not the problem. I was trying to access via the GTK client application pointing to [gnuhealth.domain.com](http://gnuhealth.domain.com) with the database and user created on the server, but doesn’t work.

I was reading some information about it and I conclude that GTK client application works with RPC calls, so the reverse proxy server can not handle the request.

Do I need to configure something else? Is it possible to forward the request when using the GTK client?

Sorry for posting this topic here, but other forums have outdated info even GNU Health doc has no related topic.

Thanks in advance 😀

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [July 16, 2020, 6:41am UTC](https://discuss.tryton.org/t/help-configuring-tryton-behind-apache-reverse-proxy/3032/2 "2020-07-16T06:41:08Z")

</div>

> [@carlostryton](#):
>
> I was able to install it with SAO 5.6

You should use the same series 5.0 also for sao.

> [@carlostryton](#):
>
> I was trying to access via the GTK client application pointing to [gnuhealth.domain.com](http://gnuhealth.domain.com) with the database and user created on the server, but doesn’t work.

If you do not specify a port on the hostname of desktop client, it will tries on port 8080.  
So you must make Apache listen also on 8080 or you must use `gnuhealth.domain.com:80`.

---

<div class="post-metadata">

**Author:** ![dave](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://discuss.tryton.org/u/dave)\
**Post date:** [July 16, 2020, 9:56am UTC](https://discuss.tryton.org/t/help-configuring-tryton-behind-apache-reverse-proxy/3032/3 "2020-07-16T09:56:09Z")

</div>

> [@ced](#):
>
> it will tries on port 8080

I think this might be a typo, as I’m pretty sure the desktop client normally defaults to port `8000`.

---

<div class="post-metadata">

**Author:** ![carlostryton](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/carlostryton/32/978_2.png) [@carlostryton](https://discuss.tryton.org/u/carlostryton)\
**Post date:** [July 16, 2020, 5:56pm UTC](https://discuss.tryton.org/t/help-configuring-tryton-behind-apache-reverse-proxy/3032/4 "2020-07-16T17:56:54Z")

</div>

Thank you very much, problem solved as you said:

- I had to use series 5.0 for SAO. Check that trytond.conf config file, [web] section, root path points correctly to SAO folder.
- The GTK client worked with domain:port configuration, pointing to port 80 in the **Host** field. Note that if one uses HTTPS config on apache via SSL certificates, it opens port 443, that works too.
- Reverse proxy needs the next configuration if you have VirtualHost config on 443 port:

RequestHeader set X-Forwarded-Proto “https”  
Header always set Access-Control-Allow-Origin “\*”

That’s it.

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [August 15, 2020, 5:56pm UTC](https://discuss.tryton.org/t/help-configuring-tryton-behind-apache-reverse-proxy/3032/5 "2020-08-15T17:56:55Z")

</div>

Closed on August 15, 2020, 5:56pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
