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.
- Download and install VirtualBox and Vagrant
- Start development VM and login:
vagrant up && vagrant ssh
- Inside VM, run
/vagrant/nginx-continuous-reload.sh
so that config changes will be applied continuously - 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.