Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a custom nginx.conf file #35

Open
ivan-rivera opened this issue Jul 3, 2020 · 3 comments
Open

Create a custom nginx.conf file #35

ivan-rivera opened this issue Jul 3, 2020 · 3 comments

Comments

@ivan-rivera
Copy link

ivan-rivera commented Jul 3, 2020

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.

@rinormaloku
Copy link
Owner

rinormaloku commented Jul 3, 2020 via email

@ivan-rivera
Copy link
Author

Does it work on Windows? Good question! I'm not sure, I think it should, but I tested it on a Mac

@rinormaloku
Copy link
Owner

rinormaloku commented Jul 3, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants