# Node-red URL via port not working for apache httpd VirtualHost

**URL:** <https://discourse.nodered.org/t/node-red-url-via-port-not-working-for-apache-httpd-virtualhost/100903>\
**Category:** General\
**Tags:** docker\
**Created:** [4 May 2026 17:24 UTC](https://discourse.nodered.org/t/node-red-url-via-port-not-working-for-apache-httpd-virtualhost/100903 "2026-05-04T17:24:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![knowledgeshark](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knowledgeshark/32/4820_2.png) [@knowledgeshark](https://discourse.nodered.org/u/knowledgeshark)\
**Post date:** [4 May 2026 17:24 UTC](https://discourse.nodered.org/t/node-red-url-via-port-not-working-for-apache-httpd-virtualhost/100903/1 "2026-05-04T17:24:13Z")

</div>

I'm moving to a new (modern) linux AWS server, and it's going well. I can run node-red and access nicely. These are not docker, and guarded now by pm2 (thanks for that).

I also have a HTTPD rewrite rule so the port isn't needed (eg. [host.com/bot](http://host.com/bot) == [host.com:2000](http://host.com:2000)).

But for some reason when I add VirtualHosts, which point to the same IP address where node-red is running, two thing happen:

1. I cannot get the port access to work (eg. [vhost.com:2000](http://vhost.com:2000))
2. The redirect works but only to the main host (eg. RewriteRule /bot to [host.com:2000](http://host.com:2000)) vs (Rewrite /bot [vhost.com:2000](http://vhost.com:2000)).

On my old linux, these worked and I can't see what is different (except 4 proxy shown below)

Here is one of my Vhost files that works ([host.com](http://host.com) is main, [vhost.com](http://vhost.com) is virtual one)

```auto
<VirtualHost *:443>
  Servername vhost.com
  SSLCerts ...
  
  ProxyRequests Off
  ProxyPreserveHost On
  SSLProxyEngine on

   # node-red
   # /bot -> :2000
   RewriteRule ^/bot$ bot/ [L,R=301]
   ProxyPass "/bot" "https://host.com:2000"
   ProxyPassReverse "/bot" "https://host.com:2000"

# VERSUS old linux which worked:
   ProxyPass "/bot" "https://vhost.com:2000"
<VirtualHost>

```

NOTE: on the new apache httpd 2.4.66 (dec 2025) they require

```auto
   SSLProxyVerify none
   SSLProxyCheckPeerCN off
   SSLProxyCheckPeerName off
   SSLProxyCheckPeerExpire off

```

And my ancient AWS (2.2.34 Nov 2017) didn't use these.

Any ideas?

NOTE: Things work with the rewrite, but I have old links that use the port and I'm trying to keep them working.

NOTE2: I also don't know if the port definitions on AWS are somehow not assigned to the vhosts? Although the firewall doesn't know about my vhosts (just DNS addresses)

---

<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:** [2 August 2026 17:24 UTC](https://discourse.nodered.org/t/node-red-url-via-port-not-working-for-apache-httpd-virtualhost/100903/2 "2026-08-02T17:24:23Z")

</div>

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