Skip to content

Instantly share code, notes, and snippets.

@minodisk
Created May 11, 2013 05:43
Show Gist options
  • Select an option

  • Save minodisk/5559020 to your computer and use it in GitHub Desktop.

Select an option

Save minodisk/5559020 to your computer and use it in GitHub Desktop.
nginx on Mac
server {
listen 80;
server_name _;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
location /api {
proxy_pass http://localhost:3000;
}
location / {
root /path/to/root;
index index.html index.htm index.fhtml index.fxhtml index.php;
autoindex on;
}
}
@minodisk
Copy link
Copy Markdown
Author

$ vim /usr/local/etc/nginx/sites-available/default
$ sudo nginx -s reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment