/nginx-playground

Setup for experimenting with nginx configurations (e.g. for serving SPA)

Primary LanguageHTML

Nginx playground

Some examples for experimenting with nginx setup, particularly for SPA. Directories from configs/ are mounted inside VM's /etc/nginx/ so that you can easily edit config files from host OS.

  1. Download and install VirtualBox and Vagrant
  2. Start development VM and login: vagrant up && vagrant ssh
  3. Inside VM, run /vagrant/nginx-continuous-reload.sh so that config changes will be applied continuously
  4. You can also run ./watch-for-nginx-config-error.sh outside of the VM to get a notification in case of config error

There should be a sample vue app available at localhost:8001 and localhost:8002/my-app.

Note: sometimes you have to reload a page twice in your browser to see the effect of config changes.