Skip to content

Instantly share code, notes, and snippets.

@forgotpw1
forgotpw1 / nginx.conf
Created January 19, 2018 19:11 — forked from sj26/nginx.conf
Proxy mailcatcher with nginx including WebSockets
daemon off;
error_log stderr;
events {
worker_connections 1024;
}
http {
# As suggested in http://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
(sudo -u postgres pg_ctl stop -D /usr/local/pgsql/data -m i -t 5 || true) && sudo stop postgresql
# start again with
sudo start postgresql