Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Error between Apache reverseproxy and nginx |
|
Author |
|
Minus
Joined: 18 Apr 2016 Posts: 8 Location: France
|
Posted: Wed 01 Jun '16 9:51 Post subject: Error between Apache reverseproxy and nginx |
|
|
Hi
I'd installed a reverso proxy apache on my local network (Ip 172.16.0.15)
I have a VM with loomio on docker (IP of the VM 172.16.0.85, and docker use 172.17.0.xxx ip on this VM)
this is my loomio.conf file on my reverse proxy server:
Code: |
## Config reverse proxy loomio ##
<VirtualHost 172.16.0.15:80>
ServerName loomio.domain.lan
ServerAlias loomio.domain.com
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://172.16.0.85:80/
ProxyPassReverse / http://172.16.0.85:80/
ErrorLog /var/log/apache2/loomio-error.log
LogLevel warn
CustomLog /var/log/apache2/loomio-access.log combined
</VirtualHost>
<VirtualHost 172.16.0.15:443>
ServerName loomio.domain.lan
ServerAlias loomio.domain.com
SSLEngine On
SSLCertificateFile /etc/apache2/SSL/loomio.pem
SSLCertificateKeyFile /etc/apache2/SSL/loomio.key
ErrorLog /var/log/apache2/loomio-error.log
LogLevel warn
CustomLog /var/log/apache2/loomio-access.log combined
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / https://172.16.0.85:443/ keepalive=On retry=5
ProxyPassReverse / https://172.16.0.85:443/
</VirtualHost>
<VirtualHost 172.16.0.15:80>
ServerName faye.loomio.domain.lan
ServerAlias faye.loomio.domain.com
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://172.16.0.85:80/
ProxyPassReverse / http://172.16.0.85:80/
ErrorLog /var/log/apache2/loomio-error.log
LogLevel warn
CustomLog /var/log/apache2/loomio-access.log combined
</VirtualHost>
<VirtualHost 172.16.0.15:443>
ServerName faye.loomio.domain.lan
ServerAlias faye.loomio.domain.com
SSLEngine On
SSLCertificateFile /etc/apache2/SSL/loomio.pem
SSLCertificateKeyFile /etc/apache2/SSL/loomio.key
ErrorLog /var/log/apache2/loomio-error.log
LogLevel warn
CustomLog /var/log/apache2/loomio-access.log combined
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / https://172.16.0.85:443/ keepalive=On retry=5
ProxyPassReverse / https://172.16.0.85:443/
</VirtualHost>
|
Loomio use nginx web server with let's encrypt CA certificate.
Loomio receive the let's encrypt certificate without any problems.
loomio works with my url htts://loomio.phimeca.com
but in the logs of loomio, i have this error:
Code: | nginx_1 | nginx.1 | 2016/06/01 07:19:04 [error] 41#41: *13 connect() failed (111: Connection refused) while connecting to upstream, client:172.16.0.15, server: loomio.domain.com, request: "GET /client/0.20.4/app.min.css HTTP/1.1", upstream: "http://172.17.0.4:3000/client/0.20.4/app.min.css", host: "loomio.domain.com", referrer: "https://loomio.domain.com/d/xPfHy1Rh/test-"
nginx_1 | nginx.1 | 2016/06/01 07:19:04 [warn] 41#41: *13 upstream server temporarily disabled while connecting to upstream, client: 172.16.0.15, server: loomio.domain.com, request: "GET /client/0.20.4/app.min.css HTTP/1.1", upstream: "http://172.17.0.4:3000/client/0.20.4/app.min.css", host: "loomio.domain.com", referrer: "https://loomio.domain.com/d/xPfHy1Rh/test-"
|
It's seems to be a problem of communication between my apache reverse proxy server (172.16.0.15) and the loomio in docker (172.17.0.4 port 3000) host by my VM 172.16.0.85
how can i solved this problem.
Thank you for your help |
|
Back to top |
|
Minus
Joined: 18 Apr 2016 Posts: 8 Location: France
|
Posted: Sun 05 Jun '16 14:09 Post subject: |
|
|
up
nobody can help me? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sun 05 Jun '16 18:31 Post subject: |
|
|
it seems that nginx can't connect to the backend server.
Check if you can open the url in a brower from the machine on that nginx is running. |
|
Back to top |
|
Minus
Joined: 18 Apr 2016 Posts: 8 Location: France
|
Posted: Mon 06 Jun '16 11:02 Post subject: |
|
|
Thank you for your help
i can't open the url 172.17.0.4:3000 with the local browser, and also to none of all dockers.
but my host can ping all docker containers
if i write the url "localhost" i have this message: 503 temporary unavalaible form nginx 1.9.12
but from another computer https://loomio.domain.com always works |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 16 Jun '16 18:45 Post subject: |
|
|
Check your firewall / iptable rules. |
|
Back to top |
|
|
|
|
|
|