Skip to content

Create a custom nginx.conf file #35

Open
@ivan-rivera

Description

First, thank you for this amazing tutorial. When I reached the Nginx installation section, I thought that it wasn't optimal to move the contents of my frontend into the nginx HTML directory and instead I decided to create a custom nginx.conf file in my sa-frontend repo, so that way I can launch the server with nginx -c nginx.conf. Here is what the server definition of my conf file looks like:

  server {
    listen       80;
    server_name  localhost;

    location / {
      root   /path/to/sa-frontend/build;
      index  index.html;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
      root   html;
    }
  }

I think this is a cleaner solution for running the app locally, however, if we run the app on Docker, then we should probably stick with the original approach.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions