# Apache2 + node-red + proxypass NO DEBUG DATA

**URL:** <https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064>\
**Category:** General\
**Created:** [30 January 2020 23:41 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064 "2020-01-30T23:41:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaborejszyn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zaborejszyn/32/16606_2.png) [@Zaborejszyn](https://discourse.nodered.org/u/Zaborejszyn)\
**Post date:** [30 January 2020 23:41 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/1 "2020-01-30T23:41:34Z")

</div>

using v1.0.3  
on rpi 4b newest rassbian lite  
over internet (https + password)  
i have got set my domain on duckdns org  
everything works like a charm when i am connecting to my node-red through  
[https://example.duckdns.org:1880](https://example.duckdns.org:1880)  
then i created virtual host in apache to maintain my node-red through subdomain like  
[https://node-red.example.duckdns.org](https://node-red.example.duckdns.org)  
and it looks like everything works like a charm but **i dont get any debug data!**  
a have tried everything  
here's my config file in apache

```auto
<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName node-red.example.duckdns.org
        ServerAlias www.node-red.example.duckdns.org
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        Include /etc/letsencrypt/options-ssl-apache.conf

        SSLEngine On
        SSLProxyEngine On
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off

        ProxyRequests Off
        ProxyPreserveHost On

        ProxyPass /comms wss://example.duckdns.org:1880/comms
        ProxyPassReverse /comms wss://example.duckdns.org:1880/comms

        ProxyPass / https://example.duckdns.org:1880/
        ProxyPassReverse / https://example.duckdns.org:1880/

        SSLCertificateFile /etc/letsencrypt/live/example.duckdns.org-0001/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/example.duckdns.org-0001/privkey.pem
</VirtualHost>
</IfModule>

```

 ![Adnotacja 2020-01-31 003837](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/82da1c789822543727d6d8eee81b39ffc1f6c103.png)  
NOTE: sometimes it magicaly works but usually its like this

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [31 January 2020 00:52 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/2 "2020-01-31T00:52:08Z")

</div>

I haven't used Apache in a long time but I think you might be missing the websockets proxy?

> **[How to Reverse Proxy Websockets with Apache 2.4 - Serverlab](https://www.serverlab.ca/tutorials/linux/web-servers-linux/how-to-reverse-proxy-websockets-with-apache-2-4/)**
>
> Learn how to configure an Apache 2.4 virtual host to correctly reverse proxy websockets using ProxyPass and Rewrite rules.

---

<div class="post-metadata">

**Author:** ![Zaborejszyn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zaborejszyn/32/16606_2.png) [@Zaborejszyn](https://discourse.nodered.org/u/Zaborejszyn)\
**Post date:** [31 January 2020 01:12 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/3 "2020-01-31T01:12:13Z")

</div>

I am getting lost connetion with RewriteEngine sollution. With proxy\_wstunnel (which i used)

```auto
ProxyPass /comms wss://example.duckdns.org:1880/comms
ProxyPassReverse /comms wss://example.duckdns.org:1880/comms

```

i am not getting any errors but nothing in debug info.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [31 January 2020 09:52 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/4 "2020-01-31T09:52:46Z")

</div>

OK, I may be steering you wrong anyway. I just had a quick look and I realise that I don't think the debug data takes the path that I thought it did. I'd need to look at the connection to my Pi to see what is happening. Unfortunately, I need to do some paid work just now ☹ I'll try to look at it later unless someone else has been able to help by then.

I'm assuming that you are running the NR Editor across the Internet with the NR server running on your local network?

If that is the case, unless you are outputting debug to the NR log as well as the sidebar, I don't think it leaves the browser? So it is possible that it isn't a network issue and you should certainly check the browser's dev console to see if there are errors there.

---

<div class="post-metadata">

**Author:** ![Zaborejszyn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zaborejszyn/32/16606_2.png) [@Zaborejszyn](https://discourse.nodered.org/u/Zaborejszyn)\
**Post date:** [31 January 2020 11:00 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/5 "2020-01-31T11:00:00Z")

</div>

Yeah i am running NR on my local network. I set debug node to output info to system console as well to debug window and i am getting timestamp on node-red-log but nothing on browser debug window... This is really confusing. After sometime it works and debug data is in debug window but its not predictible

---

<div class="post-metadata">

**Author:** ![Zaborejszyn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zaborejszyn/32/16606_2.png) [@Zaborejszyn](https://discourse.nodered.org/u/Zaborejszyn)\
**Post date:** [3 February 2020 13:17 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/6 "2020-02-03T13:17:39Z")

</div>

I discovered something. When i was on my node-red site and i restarted my apache2.  
Client calls for wss://node-red.example.duckdns.org/comms  
After that everything works fine. Why i must wait for it in normal environment.

 ![Adnotacja 2020-02-03 141424](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/4436ba552f483581d47b867f8ad509df32d98aed.png)  
and when i first connect to node-red i got this (pending state):  
 ![Adnotacja 2020-02-03 141424-1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/8287525136c95e068b9a79509650ce0fd9608db7.png)

---

<div class="post-metadata">

**Author:** ![Zaborejszyn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zaborejszyn/32/16606_2.png) [@Zaborejszyn](https://discourse.nodered.org/u/Zaborejszyn)\
**Post date:** [3 February 2020 20:58 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/7 "2020-02-03T20:58:08Z")

</div>

I gave up on apache2 and switched to nginx and everything works flawlessly!  
here's my script

```auto
server {
        listen 443 ssl;
        server_name node-red.example.duckdns.org www.node-red.example.duckdns.org;
        ssl_certificate /etc/letsencrypt/live/example.duckdns.org/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/example.duckdns.org/privkey.pem;

        location / {
                proxy_pass https://example.duckdns.org:1880;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }
}

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 February 2020 22:21 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/8 "2020-02-03T22:21:54Z")

</div>

Good call, a much better tool anyway 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 February 2020 22:21 UTC](https://discourse.nodered.org/t/apache2-node-red-proxypass-no-debug-data/21064/9 "2020-02-17T22:21:54Z")

</div>

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