# Help configuring nodered+apache2 (create subdomain)

**URL:** <https://discourse.nodered.org/t/help-configuring-nodered-apache2-create-subdomain/48474>\
**Category:** General\
**Created:** [16 July 2021 04:28 UTC](https://discourse.nodered.org/t/help-configuring-nodered-apache2-create-subdomain/48474 "2021-07-16T04:28:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamalfath](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/adamalfath/32/28888_2.png) [@adamalfath](https://discourse.nodered.org/u/adamalfath)\
**Post date:** [16 July 2021 04:28 UTC](https://discourse.nodered.org/t/help-configuring-nodered-apache2-create-subdomain/48474/1 "2021-07-16T04:28:35Z")

</div>

Hi, I've installed node-red in VPS with domain name `mydomain.net`, it's works normally under `mydomain.net:1880`. However I want to make the url it tidier by creating subdomain `nodered.mydomain.net` using apache2. Here's my configuration:

```auto
<VirtualHost *:80>
        ServerName nodered.mydomain.net
        ServerAlias *.nodered.mydomain.net
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyPass / http://localhost:1880/
        ProxyPassReverse / http://localhost:1880/
</VirtualHost>

```

The flow editor is giving me _ **Lost connection to server** _ message, the console message is _ **WebSocket connection to 'ws://nodered.mydomain.net/comms' failed:** _  
Any idea how to fix that? I'm very newbie on networking stuff and most of configuration I've made just by following tutorial on internet.  
I think the general function works normally, but it just annoying to have that message.

---

<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:** [14 September 2021 04:28 UTC](https://discourse.nodered.org/t/help-configuring-nodered-apache2-create-subdomain/48474/2 "2021-09-14T04:28:39Z")

</div>

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