Skip to content

Instantly share code, notes, and snippets.

@micho
micho / nginx.conf
Last active September 29, 2023 16:38 — forked from unixcharles/nginx.conf
nginx config for http/https proxy to localhost:3000
First, install nginx for mac with "brew install nginx".
Then follow homebrew's instructions to know where the config file is.
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self
2. Copy it somewhere (use full path in the example below for server.* files)
3. sudo nginx -s reload
4. Access https://localhost/
Edit /usr/local/etc/nginx/nginx.conf:
#!/usr/bin/ruby -rubygems
# This is a replacement for "livereload" gem for working with Rails.
# It watches the filesystem with OS X FSEvents rather than with EventMachine.
# This is better for large projects for wich EventMachine fails.
#
# Sass is supported; .sass files can also be stored in "app/styles/" directory.
#
# Command line options are "-D" to enable debug mode. All other parameters
# (if given) specify a list of directories to watch.