Error serving static website using erlang yaws

95 views Asked by At

I have a web application build using dotnet as the backend and reactjs as the frontend. I build the front end files and want to serve them using yaws. I have the following configuration in /etc/yaws/conf.d/localhost.conf:

<server localhost>
    port = 8080
    listen = 0.0.0.0
    docroot = /var/www/apps/foobar/build
    dir_listings = true 
</server>

I am using the default yaws.conf file.

The directory /var/www/apps/foobar/build has the build files:

assets
favicon.svg
index.html
manifest.json
robots.txt
static

I am able to get to the homepage but I am getting 404 page not found for subsequent pages. i.e., login page or signup pages. The same works fine with nginx.

What am I doing wrong?

0

There are 0 answers