# How to create httpStatic for docker container?

**URL:** <https://discourse.nodered.org/t/how-to-create-httpstatic-for-docker-container/95235>\
**Category:** General\
**Tags:** docker\
**Created:** [8 February 2025 06:03 UTC](https://discourse.nodered.org/t/how-to-create-httpstatic-for-docker-container/95235 "2025-02-08T06:03:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yusufscelik](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yusufscelik/32/98689_2.png) [@yusufscelik](https://discourse.nodered.org/u/yusufscelik)\
**Post date:** [8 February 2025 06:03 UTC](https://discourse.nodered.org/t/how-to-create-httpstatic-for-docker-container/95235/1 "2025-02-08T06:03:24Z")

</div>

I want to create static file and get data from static file while using node-red.  
Here is the path that i created for static file: /data/static

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/7/17ca120f72ddf561e5fa2bac610fec568b234fd0.png)

Here is the configuration for **settings.js**. I just out commented the htttpStatic: line. I gave the path what i created.

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/26cea1bc06aff55ba2f7b22fbb4654ce91f070b7.png)

But the error i get is:

Cannot GET /data/static/test.html

Am i giving the false path for **httpStatic:** maybe?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 February 2025 08:05 UTC](https://discourse.nodered.org/t/how-to-create-httpstatic-for-docker-container/95235/2 "2025-02-08T08:05:32Z")

</div>

> [@yusufscelik](#):
>
> Cannot GET /data/static/test.html

The file won't be served at the same URL as it's real path. Try just `/test.html`

---

<div class="post-metadata">

**Author:** ![yusufscelik](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yusufscelik/32/98689_2.png) [@yusufscelik](https://discourse.nodered.org/u/yusufscelik)\
**Post date:** [8 February 2025 09:41 UTC](https://discourse.nodered.org/t/how-to-create-httpstatic-for-docker-container/95235/3 "2025-02-08T09:41:52Z")

</div>

It worked. Since i use the http request node to get the content it stays as "requesting".Can i ask, whats the reason is that node stays as requesting?

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/7/d72aebf3dafd584b3659f09120520ea8ecb868b2.png)

---

<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:** [22 February 2025 09:42 UTC](https://discourse.nodered.org/t/how-to-create-httpstatic-for-docker-container/95235/4 "2025-02-22T09:42:00Z")

</div>

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