# Docker & React 404 Refresh Error

**URL:** <https://forum.codewithmosh.com/t/docker-react-404-refresh-error/4895>\
**Category:** React\
**Created:** [May 14, 2021, 4:19pm UTC](https://forum.codewithmosh.com/t/docker-react-404-refresh-error/4895 "2021-05-14T16:19:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joellawler](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/joellawler/32/1610_2.png) [@joellawler](https://forum.codewithmosh.com/u/joellawler)\
**Post date:** [May 14, 2021, 4:19pm UTC](https://forum.codewithmosh.com/t/docker-react-404-refresh-error/4895/1 "2021-05-14T16:19:23Z")

</div>

Hello,

So I have done the React & Docker courses.

I have an React app running in Docker.

I have one issue. When the user refreshes the page, they are getting a 404 error.

I have included this in the nginx.conf file:

```
location / {
    root /usr/share/nginx/html;
    index index.html index.htm;

    try_files $uri $uri/ /index.html?$args;
}

```

I have this in my Docker file:

FROM nginx

COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf  
COPY --from=build /app/build /usr/share/nginx/html

Something still is not correct.

What am I missing?

Thanks in advance.
